Compare commits

7 Commits
Author SHA1 Message Date
selimaj-dev 4bdf4278bf Bump version 2026-07-11 11:11:17 +02:00
selimaj-dev 57ea742a05 Macros fix 2026-07-11 11:08:03 +02:00
selimaj-dev bb6a095b20 constant identifiers and fix type declerations 2026-07-11 07:17:40 +02:00
selimaj-dev 1a495faec7 Updated thumbnail 2026-07-11 06:45:56 +02:00
selimaj-dev 6d015771a8 Impl 2026-07-11 06:35:11 +02:00
selimaj-dev 7d48273cb6 fn keyword 2026-07-11 06:28:00 +02:00
selimaj-dev 7d69f1f9b9 Tidy up keywords and function return type 2026-07-11 06:26:24 +02:00
4 changed files with 84 additions and 92 deletions
+5 -1
View File
@@ -1,6 +1,10 @@
# Mist VS Code Extension # Mist VS Code Extension
A Visual Studio Code extension that provides first-class language support for the Mist programming language, including syntax highlighting, editor intelligence, and structural parsing support. - [Install Analyzer (LSP)](https://marketplace.visualstudio.com/items?itemName=selimaj-dev.mist-analyzer)
- [View Website/Documentation](https://mist.selimaj.dev)
A Visual Studio Code extension that provides syntax highlighting language support for the Mist programming language.
This extension is designed to improve the developer experience when working with Mist by making .mist files easier to read, write, and navigate inside VS Code. This extension is designed to improve the developer experience when working with Mist by making .mist files easier to read, write, and navigate inside VS Code.
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "mist-syntax", "name": "mist-syntax",
"displayName": "Mist Syntax", "displayName": "Mist Syntax",
"description": "Mist Syntax Highlighting", "description": "Mist Syntax Highlighting",
"version": "0.0.8", "version": "0.0.9",
"author": { "author": {
"name": "Mist Team" "name": "Mist Team"
}, },
+78 -90
View File
@@ -19,11 +19,14 @@
"include": "#macros" "include": "#macros"
}, },
{ {
"include": "#type_declarations" "include": "#impl"
}, },
{ {
"include": "#keywords" "include": "#keywords"
}, },
{
"include": "#type_declarations"
},
{ {
"include": "#numbers" "include": "#numbers"
}, },
@@ -45,9 +48,6 @@
{ {
"include": "#struct_literals" "include": "#struct_literals"
}, },
{
"include": "#impl"
},
{ {
"include": "#method_calls" "include": "#method_calls"
}, },
@@ -177,83 +177,8 @@
] ]
}, },
"macros": { "macros": {
"patterns": [ "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*!)",
{ "name": "entity.name.function.macro.mist"
"begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(!)(\\()",
"beginCaptures": {
"1": {
"name": "entity.name.function.macro.mist"
},
"2": {
"name": "keyword.operator.macro.mist"
},
"3": {
"name": "punctuation.parenthesis.begin.mist"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.parenthesis.end.mist"
}
},
"patterns": [
{
"include": "$self"
}
]
},
{
"begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(!)(\\[)",
"beginCaptures": {
"1": {
"name": "entity.name.function.macro.mist"
},
"2": {
"name": "keyword.operator.macro.mist"
},
"3": {
"name": "punctuation.bracket.begin.mist"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.bracket.end.mist"
}
},
"patterns": [
{
"include": "$self"
}
]
},
{
"begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(!)(\\{)",
"beginCaptures": {
"1": {
"name": "entity.name.function.macro.mist"
},
"2": {
"name": "keyword.operator.macro.mist"
},
"3": {
"name": "punctuation.curly.brace.begin.mist"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.curly.brace.end.mist"
}
},
"patterns": [
{
"include": "$self"
}
]
}
]
}, },
"type_declarations": { "type_declarations": {
"patterns": [ "patterns": [
@@ -261,7 +186,11 @@
"match": "\\b(struct|enum|class|trait|type)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", "match": "\\b(struct|enum|class|trait|type)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
"captures": { "captures": {
"1": { "1": {
"name": "storage.type.mist" "patterns": [
{
"include": "#keywords"
}
]
}, },
"2": { "2": {
"name": "entity.name.type.mist" "name": "entity.name.type.mist"
@@ -272,7 +201,11 @@
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s+([a-zA-Z_][a-zA-Z0-9_]*)(?=\\s*(?:<[^;(){}]*>)?\\s*\\()", "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s+([a-zA-Z_][a-zA-Z0-9_]*)(?=\\s*(?:<[^;(){}]*>)?\\s*\\()",
"captures": { "captures": {
"1": { "1": {
"name": "entity.name.type.mist" "patterns": [
{
"include": "#types"
}
]
}, },
"2": { "2": {
"name": "entity.name.function.mist" "name": "entity.name.function.mist"
@@ -288,20 +221,68 @@
"name": "constant.language.boolean.mist" "name": "constant.language.boolean.mist"
}, },
{ {
"match": "\\b(if|else|while|for|return|break|continue|match|loop|in)\\b", "match": "\\b(if|else|match)\\b",
"name": "keyword.control.mist" "name": "keyword.control.conditional.mist"
},
{
"match": "\\b(for|while|loop|in)\\b",
"name": "keyword.control.loop.mist"
},
{
"match": "\\b(return|break|continue)\\b",
"name": "keyword.control.flow.mist"
}, },
{ {
"match": "\\b(struct|enum|class|trait|type)\\b", "match": "\\b(struct|enum|class|trait|type)\\b",
"name": "storage.type.mist" "name": "storage.type.mist"
}, },
{ {
"match": "\\b(let|const|static|impl|virtual)\\b", "match": "\\b(self|super|crate|Super)\\b",
"name": "variable.language.mist"
},
{
"match": "\\b(let|const|static)\\b",
"name": "storage.modifier.mist" "name": "storage.modifier.mist"
}, },
{ {
"match": "\\b(pub|mut|use|module|as|dyn|unsafe|self|super|Super|constructor|override)\\b", "match": "\\b(pub|mut)\\b",
"name": "keyword.other.mist" "name": "storage.modifier.visibility.mist"
},
{
"match": "\\b(virtual|override)\\b",
"name": "storage.modifier.virtual.mist"
},
{
"match": "\\b(impl)\\b",
"name": "keyword.declaration.implementation.mist"
},
{
"match": "\\b(use)\\b",
"name": "keyword.control.use.mist"
},
{
"match": "\\b(module)\\b",
"name": "keyword.control.module.mist"
},
{
"match": "\\b(as)\\b",
"name": "keyword.operator.alias.mist"
},
{
"match": "\\b(dyn)\\b",
"name": "storage.modifier.dynamic.mist"
},
{
"match": "\\b(fn)\\b",
"name": "storage.modifier.function.mist"
},
{
"match": "\\b(unsafe)\\b",
"name": "keyword.control.unsafe.mist"
},
{
"match": "\\b(constructor)\\b",
"name": "storage.type.constructor.mist"
} }
] ]
}, },
@@ -392,6 +373,10 @@
}, },
"include": "#operators" "include": "#operators"
}, },
{
"match": "\\b[A-Z][A-Z0-9_]*\\b",
"name": "constant.other.mist"
},
{ {
"match": "\\b[A-Z][A-Za-z0-9_]*\\b", "match": "\\b[A-Z][A-Za-z0-9_]*\\b",
"name": "entity.name.type.mist" "name": "entity.name.type.mist"
@@ -408,7 +393,7 @@
"name": "meta.import.mist" "name": "meta.import.mist"
}, },
"modules": { "modules": {
"match": "(?:pub\\s+)?\\bmodule\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*;", "match": "\\bmodule\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*;",
"captures": { "captures": {
"1": { "1": {
"name": "entity.name.namespace.module.mist" "name": "entity.name.namespace.module.mist"
@@ -512,7 +497,7 @@
"impl": { "impl": {
"patterns": [ "patterns": [
{ {
"match": "\\b(impl)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s+for\\s+([a-zA-Z_][a-zA-Z0-9_]*)", "match": "\\b(impl)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s+(for)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
"captures": { "captures": {
"1": { "1": {
"name": "storage.type.mist" "name": "storage.type.mist"
@@ -525,6 +510,9 @@
] ]
}, },
"3": { "3": {
"name": "storage.type.mist"
},
"4": {
"patterns": [ "patterns": [
{ {
"include": "#types" "include": "#types"
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 KiB

After

Width:  |  Height:  |  Size: 992 KiB