Skip to content

Commit d7b9812

Browse files
Copilotedvilme
andauthored
Remove serverEnabled setting introduced in PR #259 (#267)
* Initial plan * Remove serverEnabled setting from template Co-authored-by: edvilme <5952839+edvilme@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edvilme <5952839+edvilme@users.noreply.github.com>
1 parent 0f7ace5 commit d7b9812

2 files changed

Lines changed: 1 addition & 19 deletions

File tree

src/common/settings.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,7 @@ export function checkIfConfigurationChanged(e: ConfigurationChangeEvent, namespa
114114
`${namespace}.interpreter`,
115115
`${namespace}.importStrategy`,
116116
`${namespace}.showNotifications`,
117-
`${namespace}.serverEnabled`,
118117
];
119118
const changed = settings.map((s) => e.affectsConfiguration(s));
120119
return changed.includes(true);
121120
}
122-
123-
export function getServerEnabled(namespace: string): boolean {
124-
const config = getConfiguration(namespace);
125-
return config.get<boolean>('serverEnabled', true);
126-
}

src/extension.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
resolveInterpreter,
1313
} from './common/python';
1414
import { restartServer } from './common/server';
15-
import { checkIfConfigurationChanged, getInterpreterFromSetting, getServerEnabled } from './common/settings';
15+
import { checkIfConfigurationChanged, getInterpreterFromSetting } from './common/settings';
1616
import { loadServerDefaults } from './common/setup';
1717
import { LS_SERVER_RESTART_DELAY } from './common/constants';
1818
import { getLSClientTraceLevel } from './common/utilities';
@@ -61,18 +61,6 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
6161
}
6262
isRestarting = true;
6363
try {
64-
if (!getServerEnabled(serverId)) {
65-
if (lsClient) {
66-
try {
67-
await lsClient.stop();
68-
} catch (ex) {
69-
traceError(`Server: Stop failed: ${ex}`);
70-
}
71-
lsClient = undefined;
72-
}
73-
return;
74-
}
75-
7664
const interpreter = getInterpreterFromSetting(serverId);
7765
if (interpreter && interpreter.length > 0) {
7866
if (checkVersion(await resolveInterpreter(interpreter))) {

0 commit comments

Comments
 (0)