Skip to content

Commit

Permalink
if pylance support its own client, just use that.
Browse files Browse the repository at this point in the history
  • Loading branch information
heejaechang committed Oct 3, 2022
1 parent 2918d4e commit 356aeea
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 13 deletions.
6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -926,12 +926,6 @@
"description": "%python.pylanceLspNotebooksEnabled.description%",
"scope": "machine"
},
"python.pylanceLspClientEnabled": {
"type": "boolean",
"default": false,
"description": "%python.pylanceLspClientEnabled.description%",
"scope": "machine"
},
"python.sortImports.args": {
"default": [],
"description": "%python.sortImports.args.description%",
Expand Down
1 change: 0 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
"python.pipenvPath.description": "Path to the pipenv executable to use for activation.",
"python.poetryPath.description": "Path to the poetry executable.",
"python.pylanceLspNotebooksEnabled.description": "Determines if Pylance's experimental LSP notebooks support is used or not.",
"python.pylanceLspClientEnabled.description": "Determines if Pylance's experimental LSP client support is used or not.",
"python.sortImports.args.description": "Arguments passed in. Each argument is a separate item in the array.",
"python.sortImports.path.description": "Path to isort script, default using inner version",
"python.tensorBoard.logDirectory.description": "Set this setting to your preferred TensorBoard log directory to skip log directory prompt when starting TensorBoard.",
Expand Down
3 changes: 1 addition & 2 deletions src/client/activation/node/languageServerProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ export class NodeLanguageServerProxy implements ILanguageServerProxy {
const extension = await this.getPylanceExtension();
this.lsVersion = extension?.packageJSON.version || '0';

const usePylanceClient = this.configurationService.getSettings().pylanceLspClientEnabled;
if (usePylanceClient && extension && (extension.exports as PylanceApi).startClient) {
if (extension && (extension.exports as PylanceApi).startClient) {
this.pylanceApi = extension.exports as PylanceApi;
await this.pylanceApi.startClient!();
} else {
Expand Down
3 changes: 0 additions & 3 deletions src/client/common/configSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ export class PythonSettings implements IPythonSettings {

public pylanceLspNotebooksEnabled = false;

public pylanceLspClientEnabled = false;

public experiments!: IExperiments;

public languageServer: LanguageServerType = LanguageServerType.Node;
Expand Down Expand Up @@ -316,7 +314,6 @@ export class PythonSettings implements IPythonSettings {

this.globalModuleInstallation = pythonSettings.get<boolean>('globalModuleInstallation') === true;
this.pylanceLspNotebooksEnabled = pythonSettings.get<boolean>('pylanceLspNotebooksEnabled') === true;
this.pylanceLspClientEnabled = pythonSettings.get<boolean>('pylanceLspClientEnabled') === true;

const sortImportSettings = systemVariables.resolveAny(pythonSettings.get<ISortImportSettings>('sortImports'))!;
if (this.sortImports) {
Expand Down
1 change: 0 additions & 1 deletion src/client/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ export interface IPythonSettings {
readonly envFile: string;
readonly globalModuleInstallation: boolean;
readonly pylanceLspNotebooksEnabled: boolean;
readonly pylanceLspClientEnabled: boolean;
readonly experiments: IExperiments;
readonly languageServer: LanguageServerType;
readonly languageServerIsDefault: boolean;
Expand Down

0 comments on commit 356aeea

Please sign in to comment.