Skip to content

Commit 275ea87

Browse files
authored
Add an option to silence autocomplete dialog. (#497)
I'm currently getting this dialog even for projects that are not Databricks projects.
1 parent 2efb765 commit 275ea87

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

packages/databricks-vscode/src/language/ConfigureAutocomplete.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ export class ConfigureAutocomplete implements Disposable {
113113
}
114114

115115
private async configure(force = false) {
116+
if (
117+
!force &&
118+
this.context.workspaceState.get<boolean>(
119+
"skipConfigureAutocomplete"
120+
)
121+
) {
122+
return;
123+
}
124+
116125
const pythonExtension = extensions.getExtension("ms-python.python");
117126
if (pythonExtension === undefined) {
118127
window.showWarningMessage(
@@ -163,13 +172,22 @@ export class ConfigureAutocomplete implements Disposable {
163172
const choice = await window.showInformationMessage(
164173
"Do you want to configure autocompletion for Databricks specific globals (dbutils etc)?",
165174
"Configure",
166-
"Cancel"
175+
"Cancel",
176+
"Never for this workspace"
167177
);
168178

169179
if (choice === "Cancel" || choice === undefined) {
170180
return;
171181
}
172182

183+
if (choice === "Never for this workspace") {
184+
this.context.workspaceState.update(
185+
"skipConfigureAutocomplete",
186+
true
187+
);
188+
return;
189+
}
190+
173191
for (const {fn} of steps) {
174192
const result = await this.tryStep(() => fn(false));
175193
if (result === "Error" || result === "Cancel") {

0 commit comments

Comments
 (0)