From b8426f426aa3c8034bd279c8e6ce76050fe48213 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Tue, 7 Apr 2020 11:17:54 -0400 Subject: Update some packages --- editors/code/package-lock.json | 44 +++++++++++++++++++++--------------------- editors/code/package.json | 6 +++--- 2 files changed, 25 insertions(+), 25 deletions(-) (limited to 'editors') diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json index d5dec8fc5..eb4f299a1 100644 --- a/editors/code/package-lock.json +++ b/editors/code/package-lock.json @@ -115,25 +115,25 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.26.0.tgz", - "integrity": "sha512-4yUnLv40bzfzsXcTAtZyTjbiGUXMrcIJcIMioI22tSOyAxpdXiZ4r7YQUU8Jj6XXrLz9d5aMHPQf5JFR7h27Nw==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.27.0.tgz", + "integrity": "sha512-/my+vVHRN7zYgcp0n4z5A6HAK7bvKGBiswaM5zIlOQczsxj/aiD7RcgD+dvVFuwFaGh5+kM7XA6Q6PN0bvb1tw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.26.0", + "@typescript-eslint/experimental-utils": "2.27.0", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", "tsutils": "^3.17.1" } }, "@typescript-eslint/experimental-utils": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.26.0.tgz", - "integrity": "sha512-RELVoH5EYd+JlGprEyojUv9HeKcZqF7nZUGSblyAw1FwOGNnmQIU8kxJ69fttQvEwCsX5D6ECJT8GTozxrDKVQ==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.27.0.tgz", + "integrity": "sha512-vOsYzjwJlY6E0NJRXPTeCGqjv5OHgRU1kzxHKWJVPjDYGbPgLudBXjIlc+OD1hDBZ4l1DLbOc5VjofKahsu9Jw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.26.0", + "@typescript-eslint/typescript-estree": "2.27.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, @@ -150,21 +150,21 @@ } }, "@typescript-eslint/parser": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.26.0.tgz", - "integrity": "sha512-+Xj5fucDtdKEVGSh9353wcnseMRkPpEAOY96EEenN7kJVrLqy/EVwtIh3mxcUz8lsFXW1mT5nN5vvEam/a5HiQ==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.27.0.tgz", + "integrity": "sha512-HFUXZY+EdwrJXZo31DW4IS1ujQW3krzlRjBrFRrJcMDh0zCu107/nRfhk/uBasO8m0NVDbBF5WZKcIUMRO7vPg==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.26.0", - "@typescript-eslint/typescript-estree": "2.26.0", + "@typescript-eslint/experimental-utils": "2.27.0", + "@typescript-eslint/typescript-estree": "2.27.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.26.0.tgz", - "integrity": "sha512-3x4SyZCLB4zsKsjuhxDLeVJN6W29VwBnYpCsZ7vIdPel9ZqLfIZJgJXO47MNUkurGpQuIBALdPQKtsSnWpE1Yg==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.27.0.tgz", + "integrity": "sha512-t2miCCJIb/FU8yArjAvxllxbTiyNqaXJag7UOpB5DVoM3+xnjeOngtqlJkLRnMtzaRcJhe3CIR9RmL40omubhg==", "dev": true, "requires": { "debug": "^4.1.1", @@ -1367,9 +1367,9 @@ } }, "regexpp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", - "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true }, "resolve": { @@ -1407,9 +1407,9 @@ } }, "rollup": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.3.2.tgz", - "integrity": "sha512-p66+fbfaUUOGE84sHXAOgfeaYQMslgAazoQMp//nlR519R61213EPFgrMZa48j31jNacJwexSAR1Q8V/BwGKBA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.3.3.tgz", + "integrity": "sha512-uJ9VNWk80mb4wDCSfd1AyHoSc9TrWbkZtnO6wbsMTp9muSWkT26Dvc99MX1yGCOTvUN1Skw/KpFzKdUDuZKTXA==", "dev": true, "requires": { "fsevents": "~2.1.2" diff --git a/editors/code/package.json b/editors/code/package.json index 8ae8ea414..94edc6eeb 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -42,10 +42,10 @@ "@types/node": "^12.12.34", "@types/node-fetch": "^2.5.5", "@types/vscode": "^1.43.0", - "@typescript-eslint/eslint-plugin": "^2.26.0", - "@typescript-eslint/parser": "^2.26.0", + "@typescript-eslint/eslint-plugin": "^2.27.0", + "@typescript-eslint/parser": "^2.27.0", "eslint": "^6.8.0", - "rollup": "^2.3.2", + "rollup": "^2.3.3", "tslib": "^1.11.1", "typescript": "^3.8.3", "typescript-formatter": "^7.2.2", -- cgit v1.2.3 From 6f0f86d2c57749000df2d6dc2932983173f948ee Mon Sep 17 00:00:00 2001 From: kjeremy Date: Wed, 8 Apr 2020 15:45:39 -0400 Subject: Enable the SemanticTokensFeature by default This is covered under vscode's "editor.semanticHighlighting.enabled" setting plus the user has to have a theme that has opted into highlighting. Bumps required vscode stable to 1.44 --- editors/code/package.json | 7 +------ editors/code/src/client.ts | 16 ++++++---------- editors/code/src/config.ts | 1 - editors/code/src/ctx.ts | 2 +- 4 files changed, 8 insertions(+), 18 deletions(-) (limited to 'editors') diff --git a/editors/code/package.json b/editors/code/package.json index 94edc6eeb..0bf7b6ae6 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -21,7 +21,7 @@ "Programming Languages" ], "engines": { - "vscode": "^1.43.0" + "vscode": "^1.44.0" }, "enableProposedApi": true, "scripts": { @@ -342,11 +342,6 @@ "default": true, "description": "Show function name and docs in parameter hints" }, - "rust-analyzer.highlighting.semanticTokens": { - "type": "boolean", - "default": false, - "description": "Use proposed semantic tokens API for syntax highlighting" - }, "rust-analyzer.updates.channel": { "type": "string", "enum": [ diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 3b1d00bca..0ad4b63ae 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts @@ -1,11 +1,10 @@ import * as lc from 'vscode-languageclient'; import * as vscode from 'vscode'; -import { Config } from './config'; import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed'; import { SemanticTokensFeature, DocumentSemanticsTokensSignature } from 'vscode-languageclient/lib/semanticTokens.proposed'; -export async function createClient(config: Config, serverPath: string, cwd: string): Promise { +export async function createClient(serverPath: string, cwd: string): Promise { // '.' Is the fallback if no folder is open // TODO?: Workspace folders support Uri's (eg: file://test.txt). // It might be a good idea to test if the uri points to a file. @@ -73,15 +72,12 @@ export async function createClient(config: Config, serverPath: string, cwd: stri }; // To turn on all proposed features use: res.registerProposedFeatures(); - // Here we want to just enable CallHierarchyFeature since it is available on stable. - // Note that while the CallHierarchyFeature is stable the LSP protocol is not. + // Here we want to enable CallHierarchyFeature and SemanticTokensFeature + // since they are available on stable. + // Note that while these features are stable in vscode their LSP protocol + // implementations are still in the "proposed" category for 3.16. res.registerFeature(new CallHierarchyFeature(res)); - - if (config.package.enableProposedApi) { - if (config.highlightingSemanticTokens) { - res.registerFeature(new SemanticTokensFeature(res)); - } - } + res.registerFeature(new SemanticTokensFeature(res)); return res; } diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 1f45f1de0..21c1c9f23 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -69,7 +69,6 @@ export class Config { get serverPath() { return this.cfg.get("serverPath")!; } get channel() { return this.cfg.get("updates.channel")!; } get askBeforeDownload() { return this.cfg.get("updates.askBeforeDownload")!; } - get highlightingSemanticTokens() { return this.cfg.get("highlighting.semanticTokens")!; } get traceExtension() { return this.cfg.get("trace.extension")!; } get inlayHints() { diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts index bd1c3de07..f7ed62d03 100644 --- a/editors/code/src/ctx.ts +++ b/editors/code/src/ctx.ts @@ -21,7 +21,7 @@ export class Ctx { serverPath: string, cwd: string, ): Promise { - const client = await createClient(config, serverPath, cwd); + const client = await createClient(serverPath, cwd); const res = new Ctx(config, extCtx, client, serverPath); res.pushCleanup(client.start()); await client.onReady(); -- cgit v1.2.3