diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2024-04-22 19:45:37 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2024-04-22 19:45:37 +0200 |
| commit | 21d3473bacfbd8dc81fa855d085a9bb67cc5be01 (patch) | |
| tree | e4864ecff42ce303677352f5373939c5ee5943a4 /editors | |
| parent | 6ce95de7909837c4e03b0338400f0b38ae8c912a (diff) | |
| parent | 9147dc2f31f38148daaeebd083f7120bb8d6bab0 (diff) | |
Merge branch 'master' of https://github.com/DanielGavin/ols
Diffstat (limited to 'editors')
| -rw-r--r-- | editors/vscode/.npmrc | 1 | ||||
| -rw-r--r-- | editors/vscode/package-lock.json | 4 | ||||
| -rw-r--r-- | editors/vscode/syntaxes/odin.tmLanguage.json | 28 |
3 files changed, 31 insertions, 2 deletions
diff --git a/editors/vscode/.npmrc b/editors/vscode/.npmrc new file mode 100644 index 0000000..ec84bd8 --- /dev/null +++ b/editors/vscode/.npmrc @@ -0,0 +1 @@ +install-strategy=hoisted
\ No newline at end of file diff --git a/editors/vscode/package-lock.json b/editors/vscode/package-lock.json index 6d2309e..da86bd6 100644 --- a/editors/vscode/package-lock.json +++ b/editors/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "ols", - "version": "0.1.26", + "version": "0.1.27", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ols", - "version": "0.1.26", + "version": "0.1.27", "dependencies": { "adm-zip": "^0.5.9", "https-proxy-agent": "^5.0.0", diff --git a/editors/vscode/syntaxes/odin.tmLanguage.json b/editors/vscode/syntaxes/odin.tmLanguage.json index bd41c02..7f8ec14 100644 --- a/editors/vscode/syntaxes/odin.tmLanguage.json +++ b/editors/vscode/syntaxes/odin.tmLanguage.json @@ -4,6 +4,7 @@ "name": "Odin", "patterns": [ { "include": "#package-name-declaration" }, + { "include": "#import-declaration" }, { "include": "#statements" } ], "repository": { @@ -217,6 +218,33 @@ "2": { "name": "entity.name.type.module.odin" } } }, + "import-declaration": { + "name": "meta.import.odin", + "begin": "\\b(import|foreign\\s+import)\\b", + "beginCaptures": {"0": {"name": "keyword.control.import.odin"}}, + "end": "(?=^|;)", + "patterns": [ + { "name": "string.import.odin", + "match": "([\"`])([\\w\\.]*[/:])*([A-Za-z_]\\w*)([\"`])", + "captures": { + "1": {"name": "punctuation.definition.string.begin.odin"}, + "3": {"name": "entity.name.namespace.odin"}, + "4": {"name": "punctuation.definition.string.end.odin"} + } + }, + { "name": "entity.name.alias.odin", + "begin": "\\b[A-Za-z_]\\w*", + "beginCaptures": {"0": {"name": "entity.name.namespace.odin"}}, + "end": "(?=^|;)", + "patterns": [ + {"include": "#strings"}, + {"include": "#comments"} + ] + }, + {"include": "#strings"}, + {"include": "#comments"} + ] + }, "map-bitset": { "begin": "\\b(bit_set|map)\\b", "beginCaptures": { "0": { "name": "storage.type.odin" } }, |