-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #581 from ohmtech-rdi/vscode-lang-extension
Vscode language extension
- Loading branch information
Showing
11 changed files
with
329 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
.gitignore | ||
vsc-extension-quickstart.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# eurorack-blocks-vscode | ||
|
||
A Visual Studio Code extension for `eurorack-blocks` languages. | ||
|
||
Eurorack-blocks allows doing software to Hardware prototyping for Eurorack using C++, Max/Gen~ or Faust. For more informations, please visit the [eurorack-blocks](https://github.com/ohmtech-rdi/eurorack-blocks) repository. | ||
|
||
 | ||
 | ||
|
||
## Features | ||
|
||
- Provides syntax highlighting of `.erbui` and `.erbb` files. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"comments": { | ||
"lineComment": "//", | ||
"blockComment": [ "/*", "*/" ] | ||
}, | ||
// symbols used as brackets | ||
"brackets": [ | ||
["{", "}"], | ||
["[", "]"], | ||
["(", ")"] | ||
], | ||
// symbols that are auto closed when typing | ||
"autoClosingPairs": [ | ||
["{", "}"], | ||
["[", "]"], | ||
["(", ")"], | ||
["\"", "\""], | ||
["'", "'"] | ||
], | ||
// symbols that can be used to surround a selection | ||
"surroundingPairs": [ | ||
["{", "}"], | ||
["[", "]"], | ||
["(", ")"], | ||
["\"", "\""], | ||
["'", "'"] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"name": "eurorack-blocks-vscode", | ||
"displayName": "eurorack-blocks-vscode", | ||
"description": "Syntax highlighter for eurorack-blocks files", | ||
"version": "0.0.1", | ||
"repository": { | ||
"url": "https://github.com/ohmtech-rdi/eurorack-blocks" | ||
}, | ||
"homepage": "https://github.com/ohmtech-rdi/eurorack-blocks/tree/main/build-system/setup/vscode", | ||
"engines": { | ||
"vscode": "^1.79.0" | ||
}, | ||
"categories": [ | ||
"Programming Languages" | ||
], | ||
"contributes": { | ||
"languages": [ | ||
{ | ||
"id": "erbui", | ||
"aliases": [ | ||
"erbui" | ||
], | ||
"extensions": [ | ||
".erbui" | ||
], | ||
"configuration": "./language-configuration.json" | ||
}, | ||
{ | ||
"id": "erbb", | ||
"aliases": [ | ||
"erbb" | ||
], | ||
"extensions": [ | ||
".erbb" | ||
], | ||
"configuration": "./language-configuration.json" | ||
} | ||
], | ||
"grammars": [ | ||
{ | ||
"language": "erbui", | ||
"scopeName": "source.erbui", | ||
"path": "./syntaxes/erbui.tmLanguage.json" | ||
}, | ||
{ | ||
"language": "erbb", | ||
"scopeName": "source.erbb", | ||
"path": "./syntaxes/erbb.tmLanguage.json" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", | ||
"name": "erbb", | ||
"patterns": [ | ||
{ | ||
"include": "#keywords" | ||
}, | ||
{ | ||
"include": "#strings" | ||
}, | ||
{ | ||
"include": "#variables" | ||
}, | ||
{ | ||
"include": "#comments" | ||
} | ||
], | ||
"repository": { | ||
"keywords": { | ||
"patterns": [ | ||
{ | ||
"name": "keyword.control.erbb", | ||
"match": "\\b(module|file|import|define|base|section|resources|sources|data|stream|faust|address|bind|init|use|strict)\\b" | ||
}, | ||
{ | ||
"name": "keyword.control.erbb", | ||
"match": "\\b(flash|qspi|mono|interleaved|planar)\\b" | ||
}, | ||
{ | ||
"name": "keyword.type.erbb", | ||
"match": "\\b(AudioSample)\\b" | ||
} | ||
] | ||
}, | ||
"strings": { | ||
"name": "string.quoted.double.erbb", | ||
"begin": "\"", | ||
"end": "\"", | ||
"patterns": [ | ||
{ | ||
"name": "constant.character.escape.erbb", | ||
"match": "\\\\." | ||
} | ||
] | ||
}, | ||
"variables": { | ||
"patterns": [ | ||
{ | ||
"match": "[a-zA-Z0-9_]", | ||
"name": "entity.name.variable.erbui" | ||
} | ||
] | ||
}, | ||
"comments": { | ||
"patterns": [ | ||
{ | ||
"begin": "/\\*", | ||
"captures": { | ||
"0": { | ||
"name": "punctuation.definition.comment.erbb" | ||
} | ||
}, | ||
"end": "\\*/", | ||
"name": "comment.block.erbb" | ||
}, | ||
{ | ||
"captures": { | ||
"1": { | ||
"name": "punctuation.definition.comment.erbb" | ||
} | ||
}, | ||
"match": "(//).*$\\n?", | ||
"name": "comment.line.double-slash.erbb" | ||
} | ||
] | ||
} | ||
}, | ||
"scopeName": "source.erbb" | ||
} |
118 changes: 118 additions & 0 deletions
118
build-system/setup/vscode/syntaxes/erbui.tmLanguage.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", | ||
"name": "erbui", | ||
"scopeName": "source.erbui", | ||
"patterns": [ | ||
{ | ||
"include": "#keywords" | ||
}, | ||
{ | ||
"include": "#strings" | ||
}, | ||
{ | ||
"include": "#numbers" | ||
}, | ||
{ | ||
"include": "#variables" | ||
}, | ||
{ | ||
"include": "#comments" | ||
} | ||
], | ||
"repository": { | ||
"keywords": { | ||
"patterns": [ | ||
{ | ||
"name": "keyword.control.erbui", | ||
"match": "\\b(module|board|width|material|header|footer|line|control|label|sticker|image|pin|pins|normalling|mode|positioning|position|rotation|offset|route|faust|address|bind|init|value|property|exclude|extends|alias|file|class|include|pcb|net|type|gpio|pwm|dac)\\b" | ||
}, | ||
{ | ||
"name": "keyword.control.erbui", | ||
"match": "\\b(style)\\b" | ||
}, | ||
{ | ||
"name": "keyword.type.erbui", | ||
"match": "\\b(AudioIn|AudioOut|Button|CvIn|CvOut|GateIn|GateOut|LedBi|LedRgb|Led|Pot|Switch|Trim)\\b" | ||
} | ||
] | ||
}, | ||
"variables": { | ||
"patterns": [ | ||
{ | ||
"name": "entity.name.variable.erbui", | ||
"match": "\\b(center|left|top|right|bottom|normalized|bipolar|wire|manual|natural|black|white|aluminum|brushed_aluminum|aluminum_coated)\\b" | ||
}, | ||
{ | ||
"match": "[a-zA-Z0-9_]", | ||
"name": "entity.name.variable.erbui" | ||
} | ||
] | ||
}, | ||
"strings": { | ||
"name": "string.quoted.double.erbui", | ||
"begin": "\"", | ||
"end": "\"", | ||
"patterns": [ | ||
{ | ||
"name": "constant.character.escape.erbui", | ||
"match": "\\\\." | ||
} | ||
] | ||
}, | ||
"numbers": { | ||
"patterns": [ | ||
{ | ||
"name": "constant.numeric.erbui", | ||
"match": "\\b[0-9.]+°cw\\b" | ||
}, | ||
{ | ||
"name": "constant.numeric.erbui", | ||
"match": "\\b[0-9.]+°ccw\\b" | ||
}, | ||
{ | ||
"name": "constant.numeric.erbui", | ||
"match": "\\b[0-9.]+°\\b" | ||
}, | ||
{ | ||
"name": "constant.numeric.erbui", | ||
"match": "\\b[0-9.]+hp\\b" | ||
}, | ||
{ | ||
"name": "constant.numeric.erbui", | ||
"match": "\\b[0-9.]+mm\\b" | ||
}, | ||
{ | ||
"name": "constant.numeric.erbui", | ||
"match": "\\b[0-9.]+cm\\b" | ||
}, | ||
{ | ||
"name": "constant.numeric.erbui", | ||
"match": "\\b[0-9.]+\\b" | ||
} | ||
] | ||
}, | ||
"comments": { | ||
"patterns": [ | ||
{ | ||
"begin": "/\\*", | ||
"captures": { | ||
"0": { | ||
"name": "punctuation.definition.comment.erbui" | ||
} | ||
}, | ||
"end": "\\*/", | ||
"name": "comment.block.erbui" | ||
}, | ||
{ | ||
"captures": { | ||
"1": { | ||
"name": "punctuation.definition.comment.erbui" | ||
} | ||
}, | ||
"match": "(//).*$\\n?", | ||
"name": "comment.line.double-slash.erbui" | ||
} | ||
] | ||
} | ||
} | ||
} |