@@ -23,7 +23,7 @@ import { IAccount } from '../models/contracts/azure';
23
23
import * as ConnectionContracts from '../models/contracts/connection' ;
24
24
import { ClearPooledConnectionsRequest , ConnectionSummary } from '../models/contracts/connection' ;
25
25
import * as LanguageServiceContracts from '../models/contracts/languageService' ;
26
- import { EncryptOptions , IConnectionProfile } from '../models/interfaces' ;
26
+ import { EncryptOptions , IConnectionProfile , IntelliSenseConfig } from '../models/interfaces' ;
27
27
import { PlatformInformation , Runtime } from '../models/platform' ;
28
28
import * as Utils from '../models/utils' ;
29
29
import { IPrompter , IQuestion , QuestionTypes } from '../prompts/question' ;
@@ -872,9 +872,22 @@ export default class ConnectionManager {
872
872
873
873
// Note: must call flavor changed before connecting, or the timer showing an animation doesn't occur
874
874
if ( this . statusView ) {
875
- this . statusView . languageFlavorChanged ( fileUri , Constants . mssqlProviderName ) ;
875
+ // lewissanchez flag: May need to check intellisense enabled setting here
876
+ const configuration = vscode . workspace . getConfiguration ( Constants . extensionConfigSectionName ) ;
877
+ const intelliSenseConfig = configuration . get < IntelliSenseConfig > ( Constants . configIntelliSense ) ;
878
+ const flavor = intelliSenseConfig . enableIntelliSense ? Constants . mssqlProviderName : Constants . noneProviderName ;
879
+ this . statusView . languageFlavorChanged ( fileUri , flavor ) ;
876
880
this . statusView . connecting ( fileUri , connectionCreds ) ;
877
- this . statusView . languageFlavorChanged ( fileUri , Constants . mssqlProviderName ) ;
881
+ this . statusView . languageFlavorChanged ( fileUri , flavor ) ;
882
+
883
+ if ( flavor === Constants . noneProviderName ) {
884
+ SqlToolsServerClient . instance . sendNotification ( LanguageServiceContracts . LanguageFlavorChangedNotification . type ,
885
+ < LanguageServiceContracts . DidChangeLanguageFlavorParams > {
886
+ uri : fileUri ,
887
+ language : 'sql' ,
888
+ flavor : flavor
889
+ } )
890
+ }
878
891
}
879
892
this . vscodeWrapper . logToOutputChannel (
880
893
LocalizedConstants . msgConnecting ( connectionCreds . server , fileUri )
0 commit comments