diff options
Diffstat (limited to 'editors/code/src/commands/index.ts')
-rw-r--r-- | editors/code/src/commands/index.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts index ec1995396..ed56f5a4e 100644 --- a/editors/code/src/commands/index.ts +++ b/editors/code/src/commands/index.ts | |||
@@ -1,3 +1,5 @@ | |||
1 | import { Ctx, Cmd } from '../ctx' | ||
2 | |||
1 | import { analyzerStatus } from './analyzer_status'; | 3 | import { analyzerStatus } from './analyzer_status'; |
2 | import * as applySourceChange from './apply_source_change'; | 4 | import * as applySourceChange from './apply_source_change'; |
3 | import * as expandMacro from './expand_macro'; | 5 | import * as expandMacro from './expand_macro'; |
@@ -9,6 +11,10 @@ import * as parentModule from './parent_module'; | |||
9 | import * as runnables from './runnables'; | 11 | import * as runnables from './runnables'; |
10 | import * as syntaxTree from './syntaxTree'; | 12 | import * as syntaxTree from './syntaxTree'; |
11 | 13 | ||
14 | function collectGarbage(ctx: Ctx): Cmd { | ||
15 | return async () => { ctx.client.sendRequest<null>('rust-analyzer/collectGarbage', null) } | ||
16 | } | ||
17 | |||
12 | export { | 18 | export { |
13 | analyzerStatus, | 19 | analyzerStatus, |
14 | applySourceChange, | 20 | applySourceChange, |
@@ -20,4 +26,5 @@ export { | |||
20 | syntaxTree, | 26 | syntaxTree, |
21 | onEnter, | 27 | onEnter, |
22 | inlayHints, | 28 | inlayHints, |
29 | collectGarbage | ||
23 | }; | 30 | }; |