diff --git a/editor/micro.yaml b/editor/micro/kurz.yaml similarity index 100% rename from editor/micro.yaml rename to editor/micro/kurz.yaml diff --git a/editor/vscode/kurz-lang/.vscode/launch.json b/editor/vscode/kurz-lang/.vscode/launch.json new file mode 100644 index 0000000..0e191b5 --- /dev/null +++ b/editor/vscode/kurz-lang/.vscode/launch.json @@ -0,0 +1,17 @@ +// A launch configuration that launches the extension inside a new window +// Use IntelliSense to learn about possible attributes. +// Hover to view descriptions of existing attributes. +// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Extension", + "type": "extensionHost", + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}" + ] + } + ] +} \ No newline at end of file diff --git a/editor/vscode/kurz-lang/.vscodeignore b/editor/vscode/kurz-lang/.vscodeignore new file mode 100644 index 0000000..f369b5e --- /dev/null +++ b/editor/vscode/kurz-lang/.vscodeignore @@ -0,0 +1,4 @@ +.vscode/** +.vscode-test/** +.gitignore +vsc-extension-quickstart.md diff --git a/editor/vscode/kurz-lang/CHANGELOG.md b/editor/vscode/kurz-lang/CHANGELOG.md new file mode 100644 index 0000000..89247de --- /dev/null +++ b/editor/vscode/kurz-lang/CHANGELOG.md @@ -0,0 +1,9 @@ +# Change Log + +All notable changes to the "kurz-lang" extension will be documented in this file. + +Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. + +## [Unreleased] + +- Initial release \ No newline at end of file diff --git a/editor/vscode/kurz-lang/README.md b/editor/vscode/kurz-lang/README.md new file mode 100644 index 0000000..39be7ec --- /dev/null +++ b/editor/vscode/kurz-lang/README.md @@ -0,0 +1,5 @@ +# kurz-lang README + +This is a syntax highlighting extension for the lanuage '[kurz](https://gittea.dev/0x4261756D/kurz)'. + +**Enjoy!** diff --git a/editor/vscode/kurz-lang/kurz-lang-0.0.1.vsix b/editor/vscode/kurz-lang/kurz-lang-0.0.1.vsix new file mode 100644 index 0000000..8b53943 Binary files /dev/null and b/editor/vscode/kurz-lang/kurz-lang-0.0.1.vsix differ diff --git a/editor/vscode/kurz-lang/language-configuration.json b/editor/vscode/kurz-lang/language-configuration.json new file mode 100644 index 0000000..cd2a8b6 --- /dev/null +++ b/editor/vscode/kurz-lang/language-configuration.json @@ -0,0 +1,20 @@ +{ + "comments": { + // symbol used for single line comment. Remove this entry if your language does not support line comments + "lineComment": "//", + }, + // symbols used as brackets + "brackets": [ + ["{", "}"], + ], + // symbols that are auto closed when typing + "autoClosingPairs": [ + ["{", "}"], + ["\"", "\""], + ], + // symbols that can be used to surround a selection + "surroundingPairs": [ + ["{", "}"], + ["\"", "\""], + ] +} \ No newline at end of file diff --git a/editor/vscode/kurz-lang/package.json b/editor/vscode/kurz-lang/package.json new file mode 100644 index 0000000..b6247ca --- /dev/null +++ b/editor/vscode/kurz-lang/package.json @@ -0,0 +1,25 @@ +{ + "name": "kurz-lang", + "displayName": "kurz", + "description": "Syntax highlighting for the kurz language", + "version": "0.0.1", + "engines": { + "vscode": "^1.74.0" + }, + "categories": [ + "Programming Languages" + ], + "contributes": { + "languages": [{ + "id": "kurz", + "aliases": ["kurz", "kurz"], + "extensions": [".qbl"], + "configuration": "./language-configuration.json" + }], + "grammars": [{ + "language": "kurz", + "scopeName": "source.kurz", + "path": "./syntaxes/kurz.tmLanguage.json" + }] + } +} diff --git a/editor/vscode/kurz-lang/syntaxes/kurz.tmLanguage.json b/editor/vscode/kurz-lang/syntaxes/kurz.tmLanguage.json new file mode 100644 index 0000000..42e58f1 --- /dev/null +++ b/editor/vscode/kurz-lang/syntaxes/kurz.tmLanguage.json @@ -0,0 +1,89 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "kurz", + "patterns": + [ + { + "include": "#keywords" + }, + { + "include": "#strings" + }, + { + "include": "#comment" + } + ], + "repository": + { + "keywords": + { + "patterns": + [ + { + "name": "keyword.control.kurz", + "match": "\\b(if|else|while)\\b" + }, + { + "name": "keyword.operator", + "match": "[-+<>]|==|!=|=>|print(ln)?" + }, + { + "name": "support.function.kurz", + "match": "function" + }, + { + "name": "support.type.kurz", + "match": "\\b(bool|int|str|any)\\b" + }, + { + "name": "constant.numeric.kurz", + "match": "[0-9]" + }, + { + "name": "constant.language.kurz", + "match": "true|false" + }, + { + "name": "support.function.kurz", + "match": "\\b(deq|swp|dup|req|depth|decrease)\\b" + }, + { + "name": "keyword.control", + "match": "arr" + } + ] + }, + "comment": + { + "patterns": + [ + { + "name": "comment.line.kurz", + "begin": "//", + "end": "$", + "patterns": + [ + { + "name": "markup.bold.kurz", + "match": "(TODO|FIXME):?" + } + ] + } + ] + }, + "strings": + { + "name": "string.quoted.double.kurz", + "begin": "\"", + "end": "\"", + "patterns": + [ + { + "name": "constant.character.escape.kurz", + "match": "\\\\." + } + ] + } + }, + "scopeName": "source.kurz" +} \ No newline at end of file diff --git a/editor/vscode/kurz-lang/vsc-extension-quickstart.md b/editor/vscode/kurz-lang/vsc-extension-quickstart.md new file mode 100644 index 0000000..f5959bf --- /dev/null +++ b/editor/vscode/kurz-lang/vsc-extension-quickstart.md @@ -0,0 +1,29 @@ +# Welcome to your VS Code Extension + +## What's in the folder + +* This folder contains all of the files necessary for your extension. +* `package.json` - this is the manifest file in which you declare your language support and define the location of the grammar file that has been copied into your extension. +* `syntaxes/kurz.tmLanguage.json` - this is the Text mate grammar file that is used for tokenization. +* `language-configuration.json` - this is the language configuration, defining the tokens that are used for comments and brackets. + +## Get up and running straight away + +* Make sure the language configuration settings in `language-configuration.json` are accurate. +* Press `F5` to open a new window with your extension loaded. +* Create a new file with a file name suffix matching your language. +* Verify that syntax highlighting works and that the language configuration settings are working. + +## Make changes + +* You can relaunch the extension from the debug toolbar after making changes to the files listed above. +* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. + +## Add more language features + +* To add features such as IntelliSense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs + +## Install your extension + +* To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. +* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.