Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bdf4278bf | ||
|
|
57ea742a05 | ||
|
|
bb6a095b20 | ||
|
|
1a495faec7 | ||
|
|
6d015771a8 | ||
|
|
7d48273cb6 | ||
|
|
7d69f1f9b9 |
@@ -1,6 +1,10 @@
|
||||
# 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.
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "mist-syntax",
|
||||
"displayName": "Mist Syntax",
|
||||
"description": "Mist Syntax Highlighting",
|
||||
"version": "0.0.8",
|
||||
"version": "0.0.9",
|
||||
"author": {
|
||||
"name": "Mist Team"
|
||||
},
|
||||
|
||||
@@ -19,11 +19,14 @@
|
||||
"include": "#macros"
|
||||
},
|
||||
{
|
||||
"include": "#type_declarations"
|
||||
"include": "#impl"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
},
|
||||
{
|
||||
"include": "#type_declarations"
|
||||
},
|
||||
{
|
||||
"include": "#numbers"
|
||||
},
|
||||
@@ -45,9 +48,6 @@
|
||||
{
|
||||
"include": "#struct_literals"
|
||||
},
|
||||
{
|
||||
"include": "#impl"
|
||||
},
|
||||
{
|
||||
"include": "#method_calls"
|
||||
},
|
||||
@@ -177,91 +177,20 @@
|
||||
]
|
||||
},
|
||||
"macros": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(!)(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*!)",
|
||||
"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": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b(struct|enum|class|trait|type)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.type.mist"
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#keywords"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"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*\\()",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.type.mist"
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#types"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.function.mist"
|
||||
@@ -288,20 +221,68 @@
|
||||
"name": "constant.language.boolean.mist"
|
||||
},
|
||||
{
|
||||
"match": "\\b(if|else|while|for|return|break|continue|match|loop|in)\\b",
|
||||
"name": "keyword.control.mist"
|
||||
"match": "\\b(if|else|match)\\b",
|
||||
"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",
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"match": "\\b(pub|mut|use|module|as|dyn|unsafe|self|super|Super|constructor|override)\\b",
|
||||
"name": "keyword.other.mist"
|
||||
"match": "\\b(pub|mut)\\b",
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"match": "\\b[A-Z][A-Z0-9_]*\\b",
|
||||
"name": "constant.other.mist"
|
||||
},
|
||||
{
|
||||
"match": "\\b[A-Z][A-Za-z0-9_]*\\b",
|
||||
"name": "entity.name.type.mist"
|
||||
@@ -408,7 +393,7 @@
|
||||
"name": "meta.import.mist"
|
||||
},
|
||||
"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": {
|
||||
"1": {
|
||||
"name": "entity.name.namespace.module.mist"
|
||||
@@ -512,7 +497,7 @@
|
||||
"impl": {
|
||||
"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": {
|
||||
"1": {
|
||||
"name": "storage.type.mist"
|
||||
@@ -525,6 +510,9 @@
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.type.mist"
|
||||
},
|
||||
"4": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#types"
|
||||
|
||||
Reference in New Issue
Block a user