@@ -2,10 +2,10 @@ import * as vscode from "vscode";
2
2
import * as lc from "vscode-languageclient/node" ;
3
3
4
4
import * as commands from "./commands" ;
5
- import { CommandFactory , Ctx , fetchWorkspace } from "./ctx" ;
5
+ import { CommandFactory , Ctx , fetchWorkspace } from "./ctx" ;
6
6
import * as diagnostics from "./diagnostics" ;
7
- import { activateTaskProvider } from "./tasks" ;
8
- import { setContextValue } from "./util" ;
7
+ import { activateTaskProvider } from "./tasks" ;
8
+ import { setContextValue } from "./util" ;
9
9
10
10
const RUST_PROJECT_CONTEXT_NAME = "inRustProject" ;
11
11
@@ -24,12 +24,11 @@ export async function activate(
24
24
vscode . window
25
25
. showWarningMessage (
26
26
`You have both the rust-analyzer (rust-lang.rust-analyzer) and Rust (rust-lang.rust) ` +
27
- "plugins enabled. These are known to conflict and cause various functions of " +
28
- "both plugins to not work correctly. You should disable one of them." ,
27
+ "plugins enabled. These are known to conflict and cause various functions of " +
28
+ "both plugins to not work correctly. You should disable one of them." ,
29
29
"Got it"
30
30
)
31
- . then ( ( ) => {
32
- } , console . error ) ;
31
+ . then ( ( ) => { } , console . error ) ;
33
32
}
34
33
35
34
const ctx = new Ctx ( context , createCommands ( ) , fetchWorkspace ( ) ) ;
@@ -119,7 +118,7 @@ function createCommands(): Record<string, CommandFactory> {
119
118
return {
120
119
onEnter : {
121
120
enabled : commands . onEnter ,
122
- disabled : ( _ ) => ( ) => vscode . commands . executeCommand ( "default:type" , { text : "\n" } ) ,
121
+ disabled : ( _ ) => ( ) => vscode . commands . executeCommand ( "default:type" , { text : "\n" } ) ,
123
122
} ,
124
123
restartServer : {
125
124
enabled : ( ctx ) => async ( ) => {
@@ -145,53 +144,52 @@ function createCommands(): Record<string, CommandFactory> {
145
144
health : "stopped" ,
146
145
} ) ;
147
146
} ,
148
- disabled : ( _ ) => async ( ) => {
149
- } ,
147
+ disabled : ( _ ) => async ( ) => { } ,
150
148
} ,
151
149
152
- analyzerStatus : { enabled : commands . analyzerStatus } ,
153
- memoryUsage : { enabled : commands . memoryUsage } ,
154
- shuffleCrateGraph : { enabled : commands . shuffleCrateGraph } ,
155
- reloadWorkspace : { enabled : commands . reloadWorkspace } ,
156
- rebuildProcMacros : { enabled : commands . rebuildProcMacros } ,
157
- addProject : { enabled : commands . addProject } ,
158
- matchingBrace : { enabled : commands . matchingBrace } ,
159
- joinLines : { enabled : commands . joinLines } ,
160
- parentModule : { enabled : commands . parentModule } ,
161
- syntaxTree : { enabled : commands . syntaxTree } ,
162
- viewHir : { enabled : commands . viewHir } ,
163
- viewMir : { enabled : commands . viewMir } ,
150
+ analyzerStatus : { enabled : commands . analyzerStatus } ,
151
+ memoryUsage : { enabled : commands . memoryUsage } ,
152
+ shuffleCrateGraph : { enabled : commands . shuffleCrateGraph } ,
153
+ reloadWorkspace : { enabled : commands . reloadWorkspace } ,
154
+ rebuildProcMacros : { enabled : commands . rebuildProcMacros } ,
155
+ addProject : { enabled : commands . addProject } ,
156
+ matchingBrace : { enabled : commands . matchingBrace } ,
157
+ joinLines : { enabled : commands . joinLines } ,
158
+ parentModule : { enabled : commands . parentModule } ,
159
+ syntaxTree : { enabled : commands . syntaxTree } ,
160
+ viewHir : { enabled : commands . viewHir } ,
161
+ viewMir : { enabled : commands . viewMir } ,
164
162
interpretFunction : { enabled : commands . interpretFunction } ,
165
- viewFileText : { enabled : commands . viewFileText } ,
166
- viewItemTree : { enabled : commands . viewItemTree } ,
167
- viewCrateGraph : { enabled : commands . viewCrateGraph } ,
168
- viewFullCrateGraph : { enabled : commands . viewFullCrateGraph } ,
169
- expandMacro : { enabled : commands . expandMacro } ,
170
- run : { enabled : commands . run } ,
171
- copyRunCommandLine : { enabled : commands . copyRunCommandLine } ,
172
- debug : { enabled : commands . debug } ,
173
- newDebugConfig : { enabled : commands . newDebugConfig } ,
174
- openDocs : { enabled : commands . openDocs } ,
175
- openCargoToml : { enabled : commands . openCargoToml } ,
176
- peekTests : { enabled : commands . peekTests } ,
177
- moveItemUp : { enabled : commands . moveItemUp } ,
178
- moveItemDown : { enabled : commands . moveItemDown } ,
179
- cancelFlycheck : { enabled : commands . cancelFlycheck } ,
180
- clearFlycheck : { enabled : commands . clearFlycheck } ,
181
- runFlycheck : { enabled : commands . runFlycheck } ,
182
- ssr : { enabled : commands . ssr } ,
183
- serverVersion : { enabled : commands . serverVersion } ,
163
+ viewFileText : { enabled : commands . viewFileText } ,
164
+ viewItemTree : { enabled : commands . viewItemTree } ,
165
+ viewCrateGraph : { enabled : commands . viewCrateGraph } ,
166
+ viewFullCrateGraph : { enabled : commands . viewFullCrateGraph } ,
167
+ expandMacro : { enabled : commands . expandMacro } ,
168
+ run : { enabled : commands . run } ,
169
+ copyRunCommandLine : { enabled : commands . copyRunCommandLine } ,
170
+ debug : { enabled : commands . debug } ,
171
+ newDebugConfig : { enabled : commands . newDebugConfig } ,
172
+ openDocs : { enabled : commands . openDocs } ,
173
+ openCargoToml : { enabled : commands . openCargoToml } ,
174
+ peekTests : { enabled : commands . peekTests } ,
175
+ moveItemUp : { enabled : commands . moveItemUp } ,
176
+ moveItemDown : { enabled : commands . moveItemDown } ,
177
+ cancelFlycheck : { enabled : commands . cancelFlycheck } ,
178
+ clearFlycheck : { enabled : commands . clearFlycheck } ,
179
+ runFlycheck : { enabled : commands . runFlycheck } ,
180
+ ssr : { enabled : commands . ssr } ,
181
+ serverVersion : { enabled : commands . serverVersion } ,
184
182
// Internal commands which are invoked by the server.
185
- applyActionGroup : { enabled : commands . applyActionGroup } ,
186
- applySnippetWorkspaceEdit : { enabled : commands . applySnippetWorkspaceEditCommand } ,
187
- debugSingle : { enabled : commands . debugSingle } ,
188
- gotoLocation : { enabled : commands . gotoLocation } ,
189
- linkToCommand : { enabled : commands . linkToCommand } ,
190
- resolveCodeAction : { enabled : commands . resolveCodeAction } ,
191
- runSingle : { enabled : commands . runSingle } ,
192
- showReferences : { enabled : commands . showReferences } ,
193
- triggerParameterHints : { enabled : commands . triggerParameterHints } ,
194
- openLogs : { enabled : commands . openLogs } ,
195
- revealDependency : { enabled : commands . revealDependency }
183
+ applyActionGroup : { enabled : commands . applyActionGroup } ,
184
+ applySnippetWorkspaceEdit : { enabled : commands . applySnippetWorkspaceEditCommand } ,
185
+ debugSingle : { enabled : commands . debugSingle } ,
186
+ gotoLocation : { enabled : commands . gotoLocation } ,
187
+ linkToCommand : { enabled : commands . linkToCommand } ,
188
+ resolveCodeAction : { enabled : commands . resolveCodeAction } ,
189
+ runSingle : { enabled : commands . runSingle } ,
190
+ showReferences : { enabled : commands . showReferences } ,
191
+ triggerParameterHints : { enabled : commands . triggerParameterHints } ,
192
+ openLogs : { enabled : commands . openLogs } ,
193
+ revealDependency : { enabled : commands . revealDependency } ,
196
194
} ;
197
195
}
0 commit comments