Skip to content

Commit 7e911dc

Browse files
tonich-shgatesn
authored andcommitted
Configuration option for pyls executable (#513)
* vscode: pyls executable path can be configured via "pyls.executable" parameter. * vscode: fixed identation
1 parent 18f3c3f commit 7e911dc

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ Develop against VS Code
119119

120120
The Python language server can be developed against a local instance of Visual Studio Code.
121121

122-
1. Install `VSCode for Mac <http://code.visualstudio.com/docs/?dv=osx>`_
123-
2. From within VSCode View -> Command Palette, then type *shell* and run ``install 'code' command in PATH``
122+
1. Install `VSCode <https://code.visualstudio.com/download`_
124123

125124
.. code-block:: bash
126125

vscode-client/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "vscode-client",
3-
"description": "VSCode extension for running multiple language servers",
2+
"name": "pyls",
3+
"description": "Python language server",
44
"author": "Sourcegraph",
55
"repository": "https://github.com/Microsoft/vscode-languageserver-node",
66
"license": "MIT",
@@ -20,6 +20,11 @@
2020
"title": "Python Language Server Configuration",
2121
"type": "object",
2222
"properties": {
23+
"pyls.executable": {
24+
"type": "string",
25+
"default": "pyls",
26+
"description": "Language server executable"
27+
},
2328
"pyls.configurationSources": {
2429
"type": "array",
2530
"default": ["pycodestyle"],

vscode-client/src/extension.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ function startLangServerTCP(addr: number, documentSelector: string[]): Disposabl
4343
}
4444

4545
export function activate(context: ExtensionContext) {
46-
context.subscriptions.push(startLangServer("pyls", ["-vv"], ["python"]));
46+
const executable = workspace.getConfiguration("pyls").get<string>("executable");
47+
context.subscriptions.push(startLangServer(executable, ["-vv"], ["python"]));
4748
// For TCP server needs to be started seperately
4849
// context.subscriptions.push(startLangServerTCP(2087, ["python"]));
4950
}

0 commit comments

Comments
 (0)