Skip to content

Commit

Permalink
Initial VS Code language extension folder source files.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Oct 17, 2024
1 parent 376e401 commit d79d697
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 0 deletions.
1 change: 1 addition & 0 deletions extension/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
3 changes: 3 additions & 0 deletions extension/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode
node_modules
*.vsix
3 changes: 3 additions & 0 deletions extension/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode/**
.vscode-test/**
.gitignore
35 changes: 35 additions & 0 deletions extension/language-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"comments": {
"lineComment": "#"
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] }
],
"surroundingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] }
],
"folding": {
"markers": {
"start": "^\\s*//\\s*#?region\\b",
"end": "^\\s*//\\s*#?endregion\\b"
}
},
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
"indentationRules": {
"increaseIndentPattern": "^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$",
"decreaseIndentPattern": "^((?!.*?\\/\\*).*\\*/)?\\s*[\\)\\}\\]].*$"
}
}
59 changes: 59 additions & 0 deletions extension/syntaxes/zhivo.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "Zhivo",
"patterns": [
{ "include": "#keywords" },
{ "include": "#strings" },
{ "include": "#digits" },
{ "include": "#comments" }
],
"repository": {
"keywords": {
"patterns": [{
"name": "keyword.control.zhivo",
"match": "\\b(break|continue|ret|throw|if|else|unless|when|do|while|loop|random|catch|handle|then|func|use|test|render|type|true|false|maybe|nil)\\b"
}]
},
"digits": {
"patterns": [{
"name": "digit.numberic.zhivo",
"match": "\\b(0b[01]+|0t[0-2]+|0c[0-7]+|0x[0-9a-fA-F]+|\\d+(\\.\\d*)?)\\b"
}]
},
"comments": {
"patterns": [{
"name": "comment.line.zhivo",
"begin": "#",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.zhivo"
}
},
"end": "$"
}]
},
"strings": {
"name": "string.quoted.double.zhivo",
"begin": "\"",
"end": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.zhivo"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.zhivo"
}
},
"patterns": [
{
"name": "constant.character.escape.zhivo",
"match": "\\\\[btnfr\"\\\\]"
}
]
}
},
"fileTypes": ["zhv"],
"scopeName": "source.zhivo"
}

0 comments on commit d79d697

Please sign in to comment.