aboutsummaryrefslogtreecommitdiff
path: root/editors/code/package.json
diff options
context:
space:
mode:
authorSeivan Heidari <[email protected]>2019-11-04 22:59:11 +0000
committerSeivan Heidari <[email protected]>2019-11-04 22:59:11 +0000
commitc60f9bf4c6d6ddd341c673b228b6aa1add3da62b (patch)
treee411904c533ac37745397719bbfe983aeb21b372 /editors/code/package.json
parentdad9bc6caad71e6aebb92ad9883c08d30431e9b1 (diff)
* Adding scope mapping configuration manifest in `package.json`
* Loading configurable scope mappings from settings. * Updating Readme with `rust-analyzer.scopeMappings`. `rust-analyzer.scopeMappings` -- a scheme backed JSON object to tweak Rust Analyzer scopes to TextMate scopes. ```jsonc { //Will autocomplete keys to available RA scopes. "keyword.unsafe": ["keyword", "keyword.control"], //Values are string | TextMateScope | [string | TextMateScope] "comments": "comment.block" } ```
Diffstat (limited to 'editors/code/package.json')
-rw-r--r--editors/code/package.json64
1 files changed, 63 insertions, 1 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index ee997e58f..35f2f1e62 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -167,6 +167,68 @@
167 "default": false, 167 "default": false,
168 "description": "Highlight Rust code (overrides built-in syntax highlighting)" 168 "description": "Highlight Rust code (overrides built-in syntax highlighting)"
169 }, 169 },
170 "rust-analyzer.scopeMappings": {
171 "type": "object",
172 "definitions": {},
173 "properties": {
174 "comment": {
175 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
176 },
177 "string": {
178 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
179 },
180 "keyword": {
181 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
182 },
183 "keyword.control": {
184 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
185 },
186 "keyword.unsafe": {
187 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
188 },
189 "function": {
190 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
191 },
192 "parameter": {
193 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
194 },
195 "constant": {
196 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
197 },
198 "type": {
199 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
200 },
201 "builtin": {
202 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
203 },
204 "text": {
205 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
206 },
207 "attribute": {
208 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
209 },
210 "literal": {
211 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
212 },
213 "macro": {
214 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
215 },
216 "variable": {
217 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
218 },
219 "variable.mut": {
220 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
221 },
222 "field": {
223 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
224 },
225 "module": {
226 "$ref": "vscode://schemas/textmate-colors#/items/properties/scope"
227 }
228 },
229 "additionalProperties": false,
230 "description": "Mapping Rust Analyzer scopes to TextMateRule scopes list."
231 },
170 "rust-analyzer.rainbowHighlightingOn": { 232 "rust-analyzer.rainbowHighlightingOn": {
171 "type": "boolean", 233 "type": "boolean",
172 "default": false, 234 "default": false,
@@ -488,4 +550,4 @@
488 } 550 }
489 ] 551 ]
490 } 552 }
491} 553} \ No newline at end of file