Skip to content

Commit

Permalink
Upload extension files
Browse files Browse the repository at this point in the history
  • Loading branch information
xxMichalPK authored Jun 26, 2024
1 parent 0b3e297 commit f9fbd25
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 0 deletions.
30 changes: 30 additions & 0 deletions language-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"comments": {
// symbol used for single line comment. Remove this entry if your language does not support line comments
"lineComment": "//",
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
"blockComment": [ "/*", "*/" ]
},
// symbols used as brackets
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
// symbols that are auto closed when typing
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
],
// symbols that can be used to surround a selection
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
]
}
25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "vcfg-language-support",
"displayName": "VCFG Language Support",
"description": "Support for the .vcfg configuration file syntax",
"version": "0.0.1",
"engines": {
"vscode": "^1.88.0"
},
"categories": [
"Programming Languages"
],
"contributes": {
"languages": [{
"id": "vcfg",
"aliases": ["VortexConfig File", "vcfg"],
"extensions": [".vcfg"],
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": "vcfg",
"scopeName": "source.vcfg",
"path": "./syntaxes/vcfg.tmLanguage.json"
}]
}
}
91 changes: 91 additions & 0 deletions syntaxes/vcfg.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "VortexConfig File",
"patterns": [
{
"include": "#comments"
},
{
"include": "#entities"
},
{
"include": "#variables"
},
{
"include": "#constants"
},
{
"include": "#strings"
}
],
"repository": {
"comments": {
"patterns": [
{
"name": "comment.block.vcfg",
"begin": "/\\*",
"end": "\\*/",
"captures": {
"0": {
"name": "punctuation.definition.comment.vcfg"
}
}
},
{
"name": "comment.block.empty.vcfg",
"match": "/\\*\\*/",
"captures": {
"0": {
"name": "punctuation.definition.comment.vcfg"
}
}
},
{
"name": "comment.line.double-slash.vcfg",
"begin": "//",
"end": "\r?\n"
}
]
},
"entities": {
"patterns": [
{
"name": "entity.name.section.vcfg",
"match": "^(\\[.+\\])"
}
]
},
"variables": {
"patterns": [
{
"name": "variable.parameter.vcfg",
"match": "^(\\s*)((\"[^\"]+\")|([^=\\s/,.;:]+))(\\s)*(?==)"
}
]
},
"constants": {
"patterns": [
{
"name": "constant.numeric.vcfg",
"match": "\\b([0-9\\.]+)\\b"
},
{
"name": "constant.language.vcfg",
"match": "\\b(true|false)\\b"
}
]
},
"strings": {
"name": "string.quoted.double.vcfg",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.vcfg",
"match": "\\\\."
}
]
}
},
"scopeName": "source.vcfg"
}

0 comments on commit f9fbd25

Please sign in to comment.