@@ -25,7 +25,7 @@ export async function deactivate() {
25
25
export async function activate (
26
26
context : vscode . ExtensionContext ,
27
27
) : Promise < RustAnalyzerExtensionApi > {
28
- conflictExtDetect ( ) ;
28
+ checkConflictingExtensions ( ) ;
29
29
30
30
const ctx = new Ctx ( context , createCommands ( ) , fetchWorkspace ( ) ) ;
31
31
// VS Code doesn't show a notification when an extension fails to activate
@@ -192,7 +192,7 @@ function createCommands(): Record<string, CommandFactory> {
192
192
} ;
193
193
}
194
194
195
- function conflictExtDetect ( ) {
195
+ function checkConflictingExtensions ( ) {
196
196
if ( vscode . extensions . getExtension ( "rust-lang.rust" ) ) {
197
197
vscode . window
198
198
. showWarningMessage (
@@ -205,20 +205,12 @@ function conflictExtDetect() {
205
205
}
206
206
207
207
if ( vscode . extensions . getExtension ( "panicbit.cargo" ) ) {
208
- const isRustAnalyzerCheckOnSave = vscode . workspace
209
- . getConfiguration ( "rust-analyzer" )
210
- . get ( "checkOnSave" ) ;
211
- const isCargoAutomaticCheck = vscode . workspace
212
- . getConfiguration ( "cargo" )
213
- . get ( "automaticCheck" ) ;
214
- if ( isRustAnalyzerCheckOnSave && isCargoAutomaticCheck ) {
215
- vscode . window
216
- . showWarningMessage (
217
- `You have Cargo (panicbit.cargo) enabled with 'cargo.automaticCheck' set to true(default), ` +
218
- 'you can disable it or set {"cargo.automaticCheck": false} in settings.json to avoid invoke cargo twice' ,
219
- "Got it" ,
220
- )
221
- . then ( ( ) => { } , console . error ) ;
222
- }
208
+ vscode . window
209
+ . showWarningMessage (
210
+ `You have both the rust-analyzer (rust-lang.rust-analyzer) and Cargo (panicbit.cargo) ` +
211
+ 'you can disable it or set {"cargo.automaticCheck": false} in settings.json to avoid invoking cargo twice' ,
212
+ "Got it" ,
213
+ )
214
+ . then ( ( ) => { } , console . error ) ;
223
215
}
224
216
}
0 commit comments