VSCode syntax highlighting extension
This commit is contained in:
parent
d1366aee74
commit
6652a08f42
@ -75,3 +75,7 @@ Następnie musisz dodać ustawienie typu pliku na podstawie rozszerzenia wewnąt
|
||||
```vim
|
||||
au BufRead,BufNewFile *.mq set filetype=musique
|
||||
```
|
||||
|
||||
### Visual Studio Code
|
||||
|
||||
Skopiuj katalog [etc/editor/musique-vscode](etc/editor/musique-vscode) do folderu `<user home>/.vscode/extensions` i uruchom ponownie program VSCode.
|
||||
|
2
etc/editor/musique-vscode/.gitignore
vendored
Normal file
2
etc/editor/musique-vscode/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.vscode/**
|
||||
.vscode-test/**
|
23
etc/editor/musique-vscode/language-configuration.json
Normal file
23
etc/editor/musique-vscode/language-configuration.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"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": [
|
||||
["[", "]"],
|
||||
["(", ")"]
|
||||
]
|
||||
}
|
31
etc/editor/musique-vscode/package.json
Normal file
31
etc/editor/musique-vscode/package.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "musique",
|
||||
"displayName": "Musique Language Support",
|
||||
"description": "Adds suport for Musique programming language into VSCode",
|
||||
"version": "0.0.1",
|
||||
"author": {
|
||||
"name": "Robert Bendun",
|
||||
"email": "robben@st.amu.edu.pl",
|
||||
"url": "https://bendun.cc"
|
||||
},
|
||||
"license": "GNU AGPLv3",
|
||||
"engines": {
|
||||
"vscode": "^1.67.0"
|
||||
},
|
||||
"categories": [
|
||||
"Programming Languages"
|
||||
],
|
||||
"contributes": {
|
||||
"languages": [{
|
||||
"id": "musique",
|
||||
"aliases": ["Musique", "musique"],
|
||||
"extensions": [".mq"],
|
||||
"configuration": "./language-configuration.json"
|
||||
}],
|
||||
"grammars": [{
|
||||
"language": "musique",
|
||||
"scopeName": "source.musique",
|
||||
"path": "./syntaxes/musique.tmLanguage.json"
|
||||
}]
|
||||
}
|
||||
}
|
39
etc/editor/musique-vscode/syntaxes/musique.tmLanguage.json
Normal file
39
etc/editor/musique-vscode/syntaxes/musique.tmLanguage.json
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
||||
"name": "Musique",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#keywords"
|
||||
},
|
||||
{
|
||||
"include": "#strings"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"keywords": {
|
||||
"patterns": [{
|
||||
"name": "keyword.control.musique",
|
||||
"match": "\\b(var|true|false|nil)\\b"
|
||||
}]
|
||||
},
|
||||
"operators": {
|
||||
"patterns": [{
|
||||
"name": "keyword.operator.arithmetic.musique",
|
||||
"match": "(\\*|\\+|\\-|/)"
|
||||
}]
|
||||
},
|
||||
"builtins": {
|
||||
"patterns": [{
|
||||
"name": "keyword.control.musique",
|
||||
"match": "(if|play|len)"
|
||||
}]
|
||||
},
|
||||
"multiline-comments": {
|
||||
"patterns": [{
|
||||
"name": "comment.block",
|
||||
"match": "---+.*----+"
|
||||
}]
|
||||
}
|
||||
},
|
||||
"scopeName": "source.musique"
|
||||
}
|
4
etc/editor/musique-vscode/vsc-extension-quickstart.md
Normal file
4
etc/editor/musique-vscode/vsc-extension-quickstart.md
Normal file
@ -0,0 +1,4 @@
|
||||
# Install your extension
|
||||
|
||||
* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code.
|
||||
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.
|
Loading…
Reference in New Issue
Block a user