diff options
| author | Hirokazu Hata <h.hata.ai.t@gmail.com> | 2020-07-04 14:12:43 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-04 14:12:43 +0900 |
| commit | 868d139ab0966d3c8358f1feccd3168ca5a4f6c5 (patch) | |
| tree | c4e910a1c8ba4638b27a212d005b586e3665a988 | |
| parent | Merge pull request #282 from jerrywang1981/master (diff) | |
| parent | Remove call to get Python interpreter and version. (diff) | |
| download | nvim-lspconfig-868d139ab0966d3c8358f1feccd3168ca5a4f6c5.tar nvim-lspconfig-868d139ab0966d3c8358f1feccd3168ca5a4f6c5.tar.gz nvim-lspconfig-868d139ab0966d3c8358f1feccd3168ca5a4f6c5.tar.bz2 nvim-lspconfig-868d139ab0966d3c8358f1feccd3168ca5a4f6c5.tar.lz nvim-lspconfig-868d139ab0966d3c8358f1feccd3168ca5a4f6c5.tar.xz nvim-lspconfig-868d139ab0966d3c8358f1feccd3168ca5a4f6c5.tar.zst nvim-lspconfig-868d139ab0966d3c8358f1feccd3168ca5a4f6c5.zip | |
Merge pull request #292 from kosayoda/pyls_ms_interpreter
pyls_ms - Remove call to get Python interpreter and version.
| -rw-r--r-- | lua/nvim_lsp/pyls_ms.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lua/nvim_lsp/pyls_ms.lua b/lua/nvim_lsp/pyls_ms.lua index fa8241b4..6b66a600 100644 --- a/lua/nvim_lsp/pyls_ms.lua +++ b/lua/nvim_lsp/pyls_ms.lua @@ -3,13 +3,6 @@ local util = require 'nvim_lsp/util' local name = "pyls_ms" -local function get_python_version() - local f = io.popen("python --version 2>&1") -- runs command - local l = f:read("*a") -- read output of command - f:close() - return l:match("^Python%s*(...).*%s*$") -end - local function get_latest_pyls() local f = io.popen("curl -k --silent 'https://pvsc.blob.core.windows.net/python-language-server-stable?restype=container&comp=list&prefix=Python-Language-Server-osx-x64'") local l = f:read("*a") @@ -110,8 +103,8 @@ configs[name] = { interpreter = { properties = { - InterpreterPath = vim.fn.exepath("python"); - Version = get_python_version(); + InterpreterPath = ""; + Version = ""; }; }; displayOptions = {}; @@ -139,6 +132,13 @@ If you want to use your own build, set cmd to point to `Microsoft.Python.languag cmd = { "dotnet", "exec", "path/to/Microsoft.Python.languageServer.dll" }; ``` +If the `python` interpreter is not in your PATH environment variable, set the `InterpreterPath` and `Version` properties accordingly. + +```lua +InterpreterPath = "path/to/python", +Version = "3.8" +``` + This server accepts configuration via the `settings` key. ]]; |
