Skip to content

Commit 507aa77

Browse files
committed
Remove custom install prompts from server registry
1 parent c3b6662 commit 507aa77

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/cm/lsp/serverLauncher.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,16 @@ async function ensureInstalled(server) {
108108
}
109109

110110
const install = launcher.install;
111+
const displayLabel = (
112+
server.label ||
113+
server.id ||
114+
"Language server"
115+
).trim();
116+
const promptMessage =
117+
strings?.confirm || `Install ${displayLabel} language server?`;
111118
const shouldInstall = await confirm(
112-
server.label,
113-
install.prompt || strings?.confirm || "Install language server?",
119+
server.label || displayLabel,
120+
promptMessage,
114121
);
115122

116123
if (!shouldInstall) {

src/cm/lsp/serverRegistry.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ function sanitizeDefinition(definition) {
165165
typeof definition.launcher.install === "object"
166166
? {
167167
command: definition.launcher.install.command,
168-
prompt: definition.launcher.install.prompt,
169168
}
170169
: undefined,
171170
bridge: sanitizeBridge(id, definition.launcher.bridge),
@@ -280,7 +279,6 @@ function registerBuiltinServers() {
280279
install: {
281280
command:
282281
"apk add --no-cache nodejs npm && npm install -g typescript-language-server typescript",
283-
prompt: "Install TypeScript language server dependencies?",
284282
},
285283
},
286284
enabled: false,
@@ -300,7 +298,6 @@ function registerBuiltinServers() {
300298
install: {
301299
command:
302300
"apk update && apk upgrade && apk add python3 py3-pip && PIP_BREAK_SYSTEM_PACKAGES=1 pip install 'python-lsp-server[websockets,all]'",
303-
prompt: "python-lsp-server is not installed. Install it now?",
304301
},
305302
},
306303
initializationOptions: {
@@ -331,7 +328,6 @@ function registerBuiltinServers() {
331328
checkCommand: "which clangd",
332329
install: {
333330
command: "apk add --no-cache clang-extra-tools",
334-
prompt: "clangd is not installed. Install it now?",
335331
},
336332
},
337333
enabled: false,
@@ -355,7 +351,6 @@ function registerBuiltinServers() {
355351
install: {
356352
command:
357353
"apk add --no-cache nodejs npm && npm install -g vscode-langservers-extracted",
358-
prompt: "Install HTML language server dependencies?",
359354
},
360355
},
361356
enabled: false,
@@ -379,7 +374,6 @@ function registerBuiltinServers() {
379374
install: {
380375
command:
381376
"apk add --no-cache nodejs npm && npm install -g vscode-langservers-extracted",
382-
prompt: "Install CSS language server dependencies?",
383377
},
384378
},
385379
enabled: false,
@@ -403,7 +397,6 @@ function registerBuiltinServers() {
403397
install: {
404398
command:
405399
"apk add --no-cache nodejs npm && npm install -g vscode-langservers-extracted",
406-
prompt: "Install JSON language server dependencies?",
407400
},
408401
},
409402
enabled: false,

0 commit comments

Comments
 (0)