aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/code/package-lock.json66
-rw-r--r--editors/code/package.json9
-rw-r--r--editors/code/src/commands/syntax_tree.ts4
-rw-r--r--editors/code/src/config.ts4
-rw-r--r--editors/code/src/highlighting.ts52
-rw-r--r--editors/code/src/status_display.ts4
-rw-r--r--editors/code/tsconfig.json3
7 files changed, 98 insertions, 44 deletions
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json
index 806ebdb81..a7e32e288 100644
--- a/editors/code/package-lock.json
+++ b/editors/code/package-lock.json
@@ -198,6 +198,12 @@
198 "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 198 "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
199 "dev": true 199 "dev": true
200 }, 200 },
201 "commandpost": {
202 "version": "1.4.0",
203 "resolved": "https://registry.npmjs.org/commandpost/-/commandpost-1.4.0.tgz",
204 "integrity": "sha512-aE2Y4MTFJ870NuB/+2z1cXBhSBBzRydVVjzhFC4gtenEhpnj15yu0qptWGJsO9YGrcPZ3ezX8AWb1VA391MKpQ==",
205 "dev": true
206 },
201 "concat-map": { 207 "concat-map": {
202 "version": "0.0.1", 208 "version": "0.0.1",
203 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 209 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -269,6 +275,26 @@
269 "domelementtype": "1" 275 "domelementtype": "1"
270 } 276 }
271 }, 277 },
278 "editorconfig": {
279 "version": "0.15.3",
280 "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz",
281 "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==",
282 "dev": true,
283 "requires": {
284 "commander": "^2.19.0",
285 "lru-cache": "^4.1.5",
286 "semver": "^5.6.0",
287 "sigmund": "^1.0.1"
288 },
289 "dependencies": {
290 "semver": {
291 "version": "5.7.1",
292 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
293 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
294 "dev": true
295 }
296 }
297 },
272 "entities": { 298 "entities": {
273 "version": "1.1.2", 299 "version": "1.1.2",
274 "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", 300 "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
@@ -395,6 +421,16 @@
395 "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 421 "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
396 "dev": true 422 "dev": true
397 }, 423 },
424 "lru-cache": {
425 "version": "4.1.5",
426 "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
427 "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
428 "dev": true,
429 "requires": {
430 "pseudomap": "^1.0.2",
431 "yallist": "^2.1.2"
432 }
433 },
398 "magic-string": { 434 "magic-string": {
399 "version": "0.25.4", 435 "version": "0.25.4",
400 "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz", 436 "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz",
@@ -534,10 +570,10 @@
534 "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", 570 "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
535 "dev": true 571 "dev": true
536 }, 572 },
537 "prettier": { 573 "pseudomap": {
538 "version": "1.19.1", 574 "version": "1.0.2",
539 "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", 575 "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
540 "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", 576 "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
541 "dev": true 577 "dev": true
542 }, 578 },
543 "read": { 579 "read": {
@@ -596,6 +632,12 @@
596 "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 632 "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
597 "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" 633 "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
598 }, 634 },
635 "sigmund": {
636 "version": "1.0.1",
637 "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
638 "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
639 "dev": true
640 },
599 "sourcemap-codec": { 641 "sourcemap-codec": {
600 "version": "1.4.6", 642 "version": "1.4.6",
601 "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", 643 "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz",
@@ -663,6 +705,16 @@
663 "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==", 705 "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==",
664 "dev": true 706 "dev": true
665 }, 707 },
708 "typescript-formatter": {
709 "version": "7.2.2",
710 "resolved": "https://registry.npmjs.org/typescript-formatter/-/typescript-formatter-7.2.2.tgz",
711 "integrity": "sha512-V7vfI9XArVhriOTYHPzMU2WUnm5IMdu9X/CPxs8mIMGxmTBFpDABlbkBka64PZJ9/xgQeRpK8KzzAG4MPzxBDQ==",
712 "dev": true,
713 "requires": {
714 "commandpost": "^1.0.0",
715 "editorconfig": "^0.15.0"
716 }
717 },
666 "uc.micro": { 718 "uc.micro": {
667 "version": "1.0.6", 719 "version": "1.0.6",
668 "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", 720 "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
@@ -757,6 +809,12 @@
757 "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 809 "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
758 "dev": true 810 "dev": true
759 }, 811 },
812 "yallist": {
813 "version": "2.1.2",
814 "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
815 "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
816 "dev": true
817 },
760 "yauzl": { 818 "yauzl": {
761 "version": "2.10.0", 819 "version": "2.10.0",
762 "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", 820 "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
diff --git a/editors/code/package.json b/editors/code/package.json
index 46d55e32d..9444649f6 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -19,7 +19,7 @@
19 "vscode:prepublish": "rollup -c", 19 "vscode:prepublish": "rollup -c",
20 "package": "vsce package", 20 "package": "vsce package",
21 "watch": "tsc -watch -p ./", 21 "watch": "tsc -watch -p ./",
22 "prettier": "prettier --write '**/*.ts'" 22 "fmt": "tsfmt -r"
23 }, 23 },
24 "dependencies": { 24 "dependencies": {
25 "jsonc-parser": "^2.1.0", 25 "jsonc-parser": "^2.1.0",
@@ -33,17 +33,12 @@
33 "@types/node": "^12.12.21", 33 "@types/node": "^12.12.21",
34 "@types/seedrandom": "^2.4.28", 34 "@types/seedrandom": "^2.4.28",
35 "@types/vscode": "^1.41.0", 35 "@types/vscode": "^1.41.0",
36 "prettier": "^1.19.1",
37 "rollup": "^1.27.14", 36 "rollup": "^1.27.14",
38 "tslib": "^1.10.0", 37 "tslib": "^1.10.0",
39 "typescript": "^3.7.3", 38 "typescript": "^3.7.3",
39 "typescript-formatter": "^7.2.2",
40 "vsce": "^1.71.0" 40 "vsce": "^1.71.0"
41 }, 41 },
42 "prettier": {
43 "singleQuote": true,
44 "tabWidth": 4,
45 "trailingComma": "all"
46 },
47 "activationEvents": [ 42 "activationEvents": [
48 "onLanguage:rust", 43 "onLanguage:rust",
49 "onCommand:rust-analyzer.analyzerStatus", 44 "onCommand:rust-analyzer.analyzerStatus",
diff --git a/editors/code/src/commands/syntax_tree.ts b/editors/code/src/commands/syntax_tree.ts
index 20ff7e5ca..5b8f6e4d9 100644
--- a/editors/code/src/commands/syntax_tree.ts
+++ b/editors/code/src/commands/syntax_tree.ts
@@ -85,8 +85,8 @@ class TextDocumentContentProvider
85 range = editor.selection.isEmpty 85 range = editor.selection.isEmpty
86 ? undefined 86 ? undefined
87 : this.ctx.client.code2ProtocolConverter.asRange( 87 : this.ctx.client.code2ProtocolConverter.asRange(
88 editor.selection, 88 editor.selection,
89 ); 89 );
90 } 90 }
91 91
92 const request: SyntaxTreeParams = { 92 const request: SyntaxTreeParams = {
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 2bd276958..e323110a4 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -171,9 +171,9 @@ export class Config {
171 (this.cargoFeatures.allFeatures !== 171 (this.cargoFeatures.allFeatures !==
172 this.prevCargoFeatures.allFeatures || 172 this.prevCargoFeatures.allFeatures ||
173 this.cargoFeatures.noDefaultFeatures !== 173 this.cargoFeatures.noDefaultFeatures !==
174 this.prevCargoFeatures.noDefaultFeatures || 174 this.prevCargoFeatures.noDefaultFeatures ||
175 this.cargoFeatures.features.length !== 175 this.cargoFeatures.features.length !==
176 this.prevCargoFeatures.features.length || 176 this.prevCargoFeatures.features.length ||
177 this.cargoFeatures.features.some( 177 this.cargoFeatures.features.some(
178 (v, i) => v !== this.prevCargoFeatures!.features[i], 178 (v, i) => v !== this.prevCargoFeatures!.features[i],
179 )) 179 ))
diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts
index c7ee8c0a1..96d550376 100644
--- a/editors/code/src/highlighting.ts
+++ b/editors/code/src/highlighting.ts
@@ -151,32 +151,32 @@ class Highlighter {
151 string, 151 string,
152 vscode.TextEditorDecorationType, 152 vscode.TextEditorDecorationType,
153 ]> = [ 153 ]> = [
154 decoration('comment'), 154 decoration('comment'),
155 decoration('string'), 155 decoration('string'),
156 decoration('keyword'), 156 decoration('keyword'),
157 decoration('keyword.control'), 157 decoration('keyword.control'),
158 decoration('keyword.unsafe'), 158 decoration('keyword.unsafe'),
159 decoration('function'), 159 decoration('function'),
160 decoration('parameter'), 160 decoration('parameter'),
161 decoration('constant'), 161 decoration('constant'),
162 decoration('type.builtin'), 162 decoration('type.builtin'),
163 decoration('type.generic'), 163 decoration('type.generic'),
164 decoration('type.lifetime'), 164 decoration('type.lifetime'),
165 decoration('type.param'), 165 decoration('type.param'),
166 decoration('type.self'), 166 decoration('type.self'),
167 decoration('type'), 167 decoration('type'),
168 decoration('text'), 168 decoration('text'),
169 decoration('attribute'), 169 decoration('attribute'),
170 decoration('literal'), 170 decoration('literal'),
171 decoration('literal.numeric'), 171 decoration('literal.numeric'),
172 decoration('literal.char'), 172 decoration('literal.char'),
173 decoration('literal.byte'), 173 decoration('literal.byte'),
174 decoration('macro'), 174 decoration('macro'),
175 decoration('variable'), 175 decoration('variable'),
176 decoration('variable.mut', 'underline'), 176 decoration('variable.mut', 'underline'),
177 decoration('field'), 177 decoration('field'),
178 decoration('module'), 178 decoration('module'),
179 ]; 179 ];
180 180
181 return new Map<string, vscode.TextEditorDecorationType>(decorations); 181 return new Map<string, vscode.TextEditorDecorationType>(decorations);
182 } 182 }
diff --git a/editors/code/src/status_display.ts b/editors/code/src/status_display.ts
index ed8573f02..48cf0655b 100644
--- a/editors/code/src/status_display.ts
+++ b/editors/code/src/status_display.ts
@@ -28,11 +28,11 @@ export class StatusDisplay implements vscode.Disposable {
28 if (this.packageName) { 28 if (this.packageName) {
29 this.statusBarItem!.text = `cargo ${this.command} [${ 29 this.statusBarItem!.text = `cargo ${this.command} [${
30 this.packageName 30 this.packageName
31 }] ${this.frame()}`; 31 }] ${this.frame()}`;
32 } else { 32 } else {
33 this.statusBarItem!.text = `cargo ${ 33 this.statusBarItem!.text = `cargo ${
34 this.command 34 this.command
35 } ${this.frame()}`; 35 } ${this.frame()}`;
36 } 36 }
37 }, 300); 37 }, 300);
38 38
diff --git a/editors/code/tsconfig.json b/editors/code/tsconfig.json
index a4fbb4b82..fe3b40f34 100644
--- a/editors/code/tsconfig.json
+++ b/editors/code/tsconfig.json
@@ -12,7 +12,8 @@
12 "noUnusedLocals": true, 12 "noUnusedLocals": true,
13 "noUnusedParameters": true, 13 "noUnusedParameters": true,
14 "noImplicitReturns": true, 14 "noImplicitReturns": true,
15 "noFallthroughCasesInSwitch": true 15 "noFallthroughCasesInSwitch": true,
16 "newLine": "LF"
16 }, 17 },
17 "exclude": [ 18 "exclude": [
18 "node_modules" 19 "node_modules"