Skip to content

Commit 20f8cc8

Browse files
committed
Add option to default editor lang to none
1 parent 37f3eac commit 20f8cc8

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

package.json

+6
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,12 @@
11971197
"description": "%mssql.intelliSense.lowerCaseSuggestions%",
11981198
"scope": "window"
11991199
},
1200+
"mssql.intelliSense.setQueryEditorLanguageToNone": {
1201+
"type": "boolean",
1202+
"default": false,
1203+
"description": "%mssql.intelliSense.setQueryEditorLanguageToNone%",
1204+
"scope": "window"
1205+
},
12001206
"mssql.persistQueryResultTabs": {
12011207
"type": "boolean",
12021208
"default": false,

package.nls.json

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
"mssql.intelliSense.enableQuickInfo":"Should IntelliSense quick info be enabled",
101101
"mssql.enableQueryHistoryFeature":"Should Query History feature be enabled",
102102
"mssql.intelliSense.lowerCaseSuggestions":"Should IntelliSense suggestions be lowercase",
103+
"mssql.intelliSense.setQueryEditorLanguageToNone":"Should the editor language be set to None when a query editor is opened.",
103104
"mssql.persistQueryResultTabs":"Should query result selections and scroll positions be saved when switching tabs (may impact performance)",
104105
"mssql.queryHistoryLimit":"Number of query history entries to show in the Query History view",
105106
"mssql.createAzureFunction":"Create Azure Function with SQL binding",

src/controllers/connectionManager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ export default class ConnectionManager {
875875
// lewissanchez flag: May need to check intellisense enabled setting here
876876
const configuration = vscode.workspace.getConfiguration(Constants.extensionConfigSectionName);
877877
const intelliSenseConfig = configuration.get<IntelliSenseConfig>(Constants.configIntelliSense);
878-
const flavor = intelliSenseConfig.enableIntelliSense ? Constants.mssqlProviderName : Constants.noneProviderName;
878+
const flavor = intelliSenseConfig.setQueryEditorLanguageToNone ? Constants.noneProviderName : Constants.mssqlProviderName;
879879
this.statusView.languageFlavorChanged(fileUri, flavor);
880880
this.statusView.connecting(fileUri, connectionCreds);
881881
this.statusView.languageFlavorChanged(fileUri, flavor);

src/models/interfaces.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { AzureAuthType } from './contracts/azure';
1111

1212
// interfaces
1313
export interface IntelliSenseConfig {
14-
enableIntelliSense: boolean;
14+
setQueryEditorLanguageToNone: boolean;
1515
}
1616

1717
export enum ContentType {

0 commit comments

Comments
 (0)