aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/code/rust.tmGrammar.json75
-rw-r--r--editors/code/src/run.ts4
2 files changed, 44 insertions, 35 deletions
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json
index 3ddd14f9c..f0c5c3cf3 100644
--- a/editors/code/rust.tmGrammar.json
+++ b/editors/code/rust.tmGrammar.json
@@ -25,6 +25,9 @@
25 }, 25 },
26 "patterns": [ 26 "patterns": [
27 { 27 {
28 "include": "#block-comments"
29 },
30 {
28 "include": "#comments" 31 "include": "#comments"
29 }, 32 },
30 { 33 {
@@ -185,6 +188,9 @@
185 }, 188 },
186 "patterns": [ 189 "patterns": [
187 { 190 {
191 "include": "#block-comments"
192 },
193 {
188 "include": "#comments" 194 "include": "#comments"
189 }, 195 },
190 { 196 {
@@ -212,6 +218,9 @@
212 }, 218 },
213 "patterns": [ 219 "patterns": [
214 { 220 {
221 "include": "#block-comments"
222 },
223 {
215 "include": "#comments" 224 "include": "#comments"
216 }, 225 },
217 { 226 {
@@ -232,6 +241,9 @@
232 ] 241 ]
233 }, 242 },
234 { 243 {
244 "include": "#block-comments"
245 },
246 {
235 "include": "#comments" 247 "include": "#comments"
236 }, 248 },
237 { 249 {
@@ -277,31 +289,30 @@
277 { 289 {
278 "comment": "documentation comments", 290 "comment": "documentation comments",
279 "name": "comment.line.documentation.rust", 291 "name": "comment.line.documentation.rust",
280 "match": "^\\s*///.*", 292 "match": "^\\s*///.*"
281 "patterns": [
282 {
283 "include": "#comments"
284 }
285 ]
286 }, 293 },
287 { 294 {
288 "comment": "line comments", 295 "comment": "line comments",
289 "name": "comment.line.double-slash.rust", 296 "name": "comment.line.double-slash.rust",
290 "match": "\\s*//.*", 297 "match": "\\s*//.*"
291 "patterns": [
292 {
293 "include": "#comments"
294 }
295 ]
296 }, 298 },
297 { 299 {
300 "comment": "inferred types, wildcard patterns, ignored params",
301 "name": "comment.char.underscore.rust",
302 "match": "\\b_\\w*\\b[^!(]"
303 }
304 ]
305 },
306 "block-comments": {
307 "patterns": [
308 {
298 "comment": "block comments", 309 "comment": "block comments",
299 "name": "comment.block.rust", 310 "name": "comment.block.rust",
300 "begin": "/\\*(?!\\*)", 311 "begin": "/\\*(?!\\*)",
301 "end": "\\*/", 312 "end": "\\*/",
302 "patterns": [ 313 "patterns": [
303 { 314 {
304 "include": "#comments" 315 "include": "#block-comments"
305 } 316 }
306 ] 317 ]
307 }, 318 },
@@ -312,14 +323,9 @@
312 "end": "\\*/", 323 "end": "\\*/",
313 "patterns": [ 324 "patterns": [
314 { 325 {
315 "include": "#comments" 326 "include": "#block-comments"
316 } 327 }
317 ] 328 ]
318 },
319 {
320 "comment": "inferred types, wildcard patterns, ignored params",
321 "name": "comment.char.underscore.rust",
322 "match": "\\b_\\w*\\b"
323 } 329 }
324 ] 330 ]
325 }, 331 },
@@ -451,6 +457,9 @@
451 }, 457 },
452 "patterns": [ 458 "patterns": [
453 { 459 {
460 "include": "#block-comments"
461 },
462 {
454 "include": "#comments" 463 "include": "#comments"
455 }, 464 },
456 { 465 {
@@ -517,6 +526,9 @@
517 }, 526 },
518 "patterns": [ 527 "patterns": [
519 { 528 {
529 "include": "#block-comments"
530 },
531 {
520 "include": "#comments" 532 "include": "#comments"
521 }, 533 },
522 { 534 {
@@ -694,23 +706,15 @@
694 "interpolations": { 706 "interpolations": {
695 "comment": "curly brace interpolations", 707 "comment": "curly brace interpolations",
696 "name": "meta.interpolation.rust", 708 "name": "meta.interpolation.rust",
697 "begin": "{", 709 "match": "({)[^\"{}]*(})",
698 "beginCaptures": { 710 "captures": {
699 "0": { 711 "1": {
700 "name": "punctuation.definition.interpolation.rust" 712 "name": "punctuation.definition.interpolation.rust"
701 } 713 },
702 }, 714 "2": {
703 "end": "}",
704 "endCaptures": {
705 "0": {
706 "name": "punctuation.definition.interpolation.rust" 715 "name": "punctuation.definition.interpolation.rust"
707 } 716 }
708 }, 717 }
709 "patterns": [
710 {
711 "include": "#interpolations"
712 }
713 ]
714 }, 718 },
715 "lifetimes": { 719 "lifetimes": {
716 "patterns": [ 720 "patterns": [
@@ -806,6 +810,9 @@
806 }, 810 },
807 "patterns": [ 811 "patterns": [
808 { 812 {
813 "include": "#block-comments"
814 },
815 {
809 "include": "#comments" 816 "include": "#comments"
810 }, 817 },
811 { 818 {
@@ -980,7 +987,7 @@
980 "name": "punctuation.definition.string.rust" 987 "name": "punctuation.definition.string.rust"
981 } 988 }
982 }, 989 },
983 "end": "(\")(#*)", 990 "end": "(\")(\\2)",
984 "endCaptures": { 991 "endCaptures": {
985 "1": { 992 "1": {
986 "name": "punctuation.definition.string.rust" 993 "name": "punctuation.definition.string.rust"
diff --git a/editors/code/src/run.ts b/editors/code/src/run.ts
index 459b7f250..17573cd82 100644
--- a/editors/code/src/run.ts
+++ b/editors/code/src/run.ts
@@ -129,7 +129,9 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
129 } 129 }
130 130
131 const args = [...runnable.args.cargoArgs]; // should be a copy! 131 const args = [...runnable.args.cargoArgs]; // should be a copy!
132 args.push(...runnable.args.cargoExtraArgs); // Append user-specified cargo options. 132 if (runnable.args.cargoExtraArgs) {
133 args.push(...runnable.args.cargoExtraArgs); // Append user-specified cargo options.
134 }
133 if (runnable.args.executableArgs.length > 0) { 135 if (runnable.args.executableArgs.length > 0) {
134 args.push('--', ...runnable.args.executableArgs); 136 args.push('--', ...runnable.args.executableArgs);
135 } 137 }