@@ -25,7 +25,7 @@ export async function deactivate() {
2525export async function activate (
2626 context : vscode . ExtensionContext ,
2727) : Promise < RustAnalyzerExtensionApi > {
28- conflictExtDetect ( ) ;
28+ checkConflictingExtensions ( ) ;
2929
3030 const ctx = new Ctx ( context , createCommands ( ) , fetchWorkspace ( ) ) ;
3131 // VS Code doesn't show a notification when an extension fails to activate
@@ -192,7 +192,7 @@ function createCommands(): Record<string, CommandFactory> {
192192 } ;
193193}
194194
195- function conflictExtDetect ( ) {
195+ function checkConflictingExtensions ( ) {
196196 if ( vscode . extensions . getExtension ( "rust-lang.rust" ) ) {
197197 vscode . window
198198 . showWarningMessage (
@@ -205,20 +205,12 @@ function conflictExtDetect() {
205205 }
206206
207207 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 ) ;
223215 }
224216}
0 commit comments