diff options
-rw-r--r-- | .cargo/config | 2 | ||||
-rw-r--r-- | ARCHITECTURE.md | 8 | ||||
-rw-r--r-- | editors/code/package.json | 28 | ||||
-rw-r--r-- | editors/code/src/commands/runnables.ts | 3 |
4 files changed, 27 insertions, 14 deletions
diff --git a/.cargo/config b/.cargo/config index 3fba0f71d..b12f407e6 100644 --- a/.cargo/config +++ b/.cargo/config | |||
@@ -5,6 +5,8 @@ gen-syntax = "run --package tools --bin tools -- gen-syntax" | |||
5 | gen-tests = "run --package tools --bin tools -- gen-tests" | 5 | gen-tests = "run --package tools --bin tools -- gen-tests" |
6 | # Installs ra_lsp_server | 6 | # Installs ra_lsp_server |
7 | install-lsp = "install --path crates/ra_lsp_server --force" | 7 | install-lsp = "install --path crates/ra_lsp_server --force" |
8 | # Installs ra_lsp_server with the jemalloc feature | ||
9 | jinstall-lsp = "install --path crates/ra_lsp_server --force --features jemalloc" | ||
8 | # Installs the visual studio code extension | 10 | # Installs the visual studio code extension |
9 | install-code = "run --package tools --bin tools -- install-code" | 11 | install-code = "run --package tools --bin tools -- install-code" |
10 | # Formats the full repository or installs the git hook to do it automatically. | 12 | # Formats the full repository or installs the git hook to do it automatically. |
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index cb8f01f78..8602de56d 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md | |||
@@ -178,7 +178,7 @@ VS Code plugin | |||
178 | 178 | ||
179 | To try out VS Code extensions, run `cargo install-code`. This installs both the | 179 | To try out VS Code extensions, run `cargo install-code`. This installs both the |
180 | `ra_lsp_server` binary and the VS Code extension. To install only the binary, use | 180 | `ra_lsp_server` binary and the VS Code extension. To install only the binary, use |
181 | `cargo install --path crates/ra_lsp_server --force` | 181 | `cargo install-lsp` (shorthand for `cargo install --path crates/ra_lsp_server --force`) |
182 | 182 | ||
183 | To see logs from the language server, set `RUST_LOG=info` env variable. To see | 183 | To see logs from the language server, set `RUST_LOG=info` env variable. To see |
184 | all communication between the server and the client, use | 184 | all communication between the server and the client, use |
@@ -186,12 +186,12 @@ all communication between the server and the client, use | |||
186 | 186 | ||
187 | There's `rust-analyzer: status` command which prints common high-level debug | 187 | There's `rust-analyzer: status` command which prints common high-level debug |
188 | info. In particular, it prints info about memory usage of various data | 188 | info. In particular, it prints info about memory usage of various data |
189 | structures, and, if compiled with jemalloc support (`cargo install --features | 189 | structures, and, if compiled with jemalloc support (`cargo jinstall-lsp` or |
190 | jemalloc`), the summary statistic about the heap. | 190 | `cargo install --path crates/ra_lsp_server --force --features jemalloc`), includes |
191 | statistic about the heap. | ||
191 | 192 | ||
192 | To run tests, just `cargo test`. | 193 | To run tests, just `cargo test`. |
193 | 194 | ||
194 | To work on the VS Code extension, launch code inside `editors/code` and use `F5` to | 195 | To work on the VS Code extension, launch code inside `editors/code` and use `F5` to |
195 | launch/debug. To automatically apply formatter and linter suggestions, use `npm | 196 | launch/debug. To automatically apply formatter and linter suggestions, use `npm |
196 | run fix`. | 197 | run fix`. |
197 | |||
diff --git a/editors/code/package.json b/editors/code/package.json index 05c67d822..1ed834d62 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -44,7 +44,9 @@ | |||
44 | "vscode": "^1.1.26" | 44 | "vscode": "^1.1.26" |
45 | }, | 45 | }, |
46 | "activationEvents": [ | 46 | "activationEvents": [ |
47 | "onLanguage:rust" | 47 | "onLanguage:rust", |
48 | "onCommand:rust-analyzer.analyzerStatus", | ||
49 | "onCommand:rust-analyzer.collectGarbage" | ||
48 | ], | 50 | ], |
49 | "main": "./out/extension", | 51 | "main": "./out/extension", |
50 | "contributes": { | 52 | "contributes": { |
@@ -73,35 +75,43 @@ | |||
73 | "commands": [ | 75 | "commands": [ |
74 | { | 76 | { |
75 | "command": "rust-analyzer.syntaxTree", | 77 | "command": "rust-analyzer.syntaxTree", |
76 | "title": "rust-analyzer: syntax tree" | 78 | "title": "Show syntax tree for current file", |
79 | "category": "Rust Analyzer" | ||
77 | }, | 80 | }, |
78 | { | 81 | { |
79 | "command": "rust-analyzer.extendSelection", | 82 | "command": "rust-analyzer.extendSelection", |
80 | "title": "rust-analyzer: extend selection" | 83 | "title": "Extend selection", |
84 | "category": "Rust Analyzer" | ||
81 | }, | 85 | }, |
82 | { | 86 | { |
83 | "command": "rust-analyzer.matchingBrace", | 87 | "command": "rust-analyzer.matchingBrace", |
84 | "title": "rust-analyzer: matching brace" | 88 | "title": "Find matching brace", |
89 | "category": "Rust Analyzer" | ||
85 | }, | 90 | }, |
86 | { | 91 | { |
87 | "command": "rust-analyzer.parentModule", | 92 | "command": "rust-analyzer.parentModule", |
88 | "title": "rust-analyzer: parent module" | 93 | "title": "Locate parent module", |
94 | "category": "Rust Analyzer" | ||
89 | }, | 95 | }, |
90 | { | 96 | { |
91 | "command": "rust-analyzer.joinLines", | 97 | "command": "rust-analyzer.joinLines", |
92 | "title": "rust-analyzer: join lines" | 98 | "title": "Join lines", |
99 | "category": "Rust Analyzer" | ||
93 | }, | 100 | }, |
94 | { | 101 | { |
95 | "command": "rust-analyzer.run", | 102 | "command": "rust-analyzer.run", |
96 | "title": "rust-analyzer: run" | 103 | "title": "Run", |
104 | "category": "Rust Analyzer" | ||
97 | }, | 105 | }, |
98 | { | 106 | { |
99 | "command": "rust-analyzer.analyzerStatus", | 107 | "command": "rust-analyzer.analyzerStatus", |
100 | "title": "rust-analyzer: status" | 108 | "title": "Status", |
109 | "category": "Rust Analyzer" | ||
101 | }, | 110 | }, |
102 | { | 111 | { |
103 | "command": "rust-analyzer.collectGarbage", | 112 | "command": "rust-analyzer.collectGarbage", |
104 | "title": "rust-analyzer: run gc" | 113 | "title": "Run garbage collection", |
114 | "category": "Rust Analyzer" | ||
105 | } | 115 | } |
106 | ], | 116 | ], |
107 | "keybindings": [ | 117 | "keybindings": [ |
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts index d9ae56420..c0f2ada76 100644 --- a/editors/code/src/commands/runnables.ts +++ b/editors/code/src/commands/runnables.ts | |||
@@ -118,7 +118,8 @@ export async function handleSingle(runnable: Runnable) { | |||
118 | task.group = vscode.TaskGroup.Build; | 118 | task.group = vscode.TaskGroup.Build; |
119 | task.presentationOptions = { | 119 | task.presentationOptions = { |
120 | reveal: vscode.TaskRevealKind.Always, | 120 | reveal: vscode.TaskRevealKind.Always, |
121 | panel: vscode.TaskPanelKind.Dedicated | 121 | panel: vscode.TaskPanelKind.Dedicated, |
122 | clear: true | ||
122 | }; | 123 | }; |
123 | 124 | ||
124 | return vscode.tasks.executeTask(task); | 125 | return vscode.tasks.executeTask(task); |