diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-01 14:08:25 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-01 14:08:25 +0100 |
commit | 3f94ad332aa22252a46d948888f5b23c0e21cd38 (patch) | |
tree | 8ba9457b48fa73741f9639c5ff6d8baa152a6aac /editors/code | |
parent | e080c19cca52b56ffc62988518faeaabf9c021be (diff) | |
parent | c9f878962a7c9d1c33d5834a1dce2106c9286699 (diff) |
Merge #5169
5169: Add reload workspace command r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package.json | 8 | ||||
-rw-r--r-- | editors/code/src/commands.ts | 4 | ||||
-rw-r--r-- | editors/code/src/lsp_ext.ts | 2 | ||||
-rw-r--r-- | editors/code/src/main.ts | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index fcb101fc6..af0a5c851 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -61,7 +61,7 @@ | |||
61 | "activationEvents": [ | 61 | "activationEvents": [ |
62 | "onLanguage:rust", | 62 | "onLanguage:rust", |
63 | "onCommand:rust-analyzer.analyzerStatus", | 63 | "onCommand:rust-analyzer.analyzerStatus", |
64 | "onCommand:rust-analyzer.collectGarbage", | 64 | "onCommand:rust-analyzer.reloadWorkspace", |
65 | "workspaceContains:**/Cargo.toml" | 65 | "workspaceContains:**/Cargo.toml" |
66 | ], | 66 | ], |
67 | "main": "./out/src/main", | 67 | "main": "./out/src/main", |
@@ -143,8 +143,8 @@ | |||
143 | "category": "Rust Analyzer" | 143 | "category": "Rust Analyzer" |
144 | }, | 144 | }, |
145 | { | 145 | { |
146 | "command": "rust-analyzer.collectGarbage", | 146 | "command": "rust-analyzer.reloadWorkspace", |
147 | "title": "Run garbage collection", | 147 | "title": "Reload workspace", |
148 | "category": "Rust Analyzer" | 148 | "category": "Rust Analyzer" |
149 | }, | 149 | }, |
150 | { | 150 | { |
@@ -815,7 +815,7 @@ | |||
815 | "when": "inRustProject" | 815 | "when": "inRustProject" |
816 | }, | 816 | }, |
817 | { | 817 | { |
818 | "command": "rust-analyzer.collectGarbage", | 818 | "command": "rust-analyzer.reloadWorkspace", |
819 | "when": "inRustProject" | 819 | "when": "inRustProject" |
820 | }, | 820 | }, |
821 | { | 821 | { |
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index 0e78f5101..19a9c2a0d 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts | |||
@@ -330,8 +330,8 @@ export function expandMacro(ctx: Ctx): Cmd { | |||
330 | }; | 330 | }; |
331 | } | 331 | } |
332 | 332 | ||
333 | export function collectGarbage(ctx: Ctx): Cmd { | 333 | export function reloadWorkspace(ctx: Ctx): Cmd { |
334 | return async () => ctx.client.sendRequest(ra.collectGarbage, null); | 334 | return async () => ctx.client.sendRequest(ra.reloadWorkspace, null); |
335 | } | 335 | } |
336 | 336 | ||
337 | export function showReferences(ctx: Ctx): Cmd { | 337 | export function showReferences(ctx: Ctx): Cmd { |
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts index fdb99956b..981b6f40e 100644 --- a/editors/code/src/lsp_ext.ts +++ b/editors/code/src/lsp_ext.ts | |||
@@ -6,7 +6,7 @@ import * as lc from "vscode-languageclient"; | |||
6 | 6 | ||
7 | export const analyzerStatus = new lc.RequestType<null, string, void>("rust-analyzer/analyzerStatus"); | 7 | export const analyzerStatus = new lc.RequestType<null, string, void>("rust-analyzer/analyzerStatus"); |
8 | 8 | ||
9 | export const collectGarbage = new lc.RequestType<null, null, void>("rust-analyzer/collectGarbage"); | 9 | export const reloadWorkspace = new lc.RequestType<null, null, void>("rust-analyzer/reloadWorkspace"); |
10 | 10 | ||
11 | export interface SyntaxTreeParams { | 11 | export interface SyntaxTreeParams { |
12 | textDocument: lc.TextDocumentIdentifier; | 12 | textDocument: lc.TextDocumentIdentifier; |
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 5ceab8b44..2982b9cbf 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts | |||
@@ -88,7 +88,7 @@ export async function activate(context: vscode.ExtensionContext) { | |||
88 | }); | 88 | }); |
89 | 89 | ||
90 | ctx.registerCommand('analyzerStatus', commands.analyzerStatus); | 90 | ctx.registerCommand('analyzerStatus', commands.analyzerStatus); |
91 | ctx.registerCommand('collectGarbage', commands.collectGarbage); | 91 | ctx.registerCommand('reloadWorkspace', commands.reloadWorkspace); |
92 | ctx.registerCommand('matchingBrace', commands.matchingBrace); | 92 | ctx.registerCommand('matchingBrace', commands.matchingBrace); |
93 | ctx.registerCommand('joinLines', commands.joinLines); | 93 | ctx.registerCommand('joinLines', commands.joinLines); |
94 | ctx.registerCommand('parentModule', commands.parentModule); | 94 | ctx.registerCommand('parentModule', commands.parentModule); |