diff options
| author | Hirokazu Hata <h.hata.ai.t@gmail.com> | 2020-12-09 23:04:28 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-09 23:04:28 +0900 |
| commit | d1043a19b0e24e44972948d1ebf522c66b9caff5 (patch) | |
| tree | f44b4f9d99df2de966962baf9809442560bfbd66 /lua | |
| parent | Merge pull request #406 from igrep/purescriptls-win (diff) | |
| parent | Add extension to pyright command name on Windows (diff) | |
| download | nvim-lspconfig-d1043a19b0e24e44972948d1ebf522c66b9caff5.tar nvim-lspconfig-d1043a19b0e24e44972948d1ebf522c66b9caff5.tar.gz nvim-lspconfig-d1043a19b0e24e44972948d1ebf522c66b9caff5.tar.bz2 nvim-lspconfig-d1043a19b0e24e44972948d1ebf522c66b9caff5.tar.lz nvim-lspconfig-d1043a19b0e24e44972948d1ebf522c66b9caff5.tar.xz nvim-lspconfig-d1043a19b0e24e44972948d1ebf522c66b9caff5.tar.zst nvim-lspconfig-d1043a19b0e24e44972948d1ebf522c66b9caff5.zip | |
Merge pull request #439 from benawas/master
Add extension to pyright command name on Windows
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/pyright.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lua/lspconfig/pyright.lua b/lua/lspconfig/pyright.lua index 768663db..d9552bfc 100644 --- a/lua/lspconfig/pyright.lua +++ b/lua/lspconfig/pyright.lua @@ -2,16 +2,20 @@ local configs = require 'lspconfig/configs' local util = require 'lspconfig/util' local server_name = "pyright" +local bin_name = "pyright-langserver" +if vim.fn.has('win32') == 1 then + bin_name = bin_name..".cmd" +end local installer = util.npm_installer { server_name = server_name; packages = {server_name}; - binaries = {server_name}; + binaries = {bin_name}; } configs[server_name] = { default_config = { - cmd = {"pyright-langserver", "--stdio"}; + cmd = {bin_name, "--stdio"}; filetypes = {"python"}; root_dir = util.root_pattern(".git", "setup.py", "setup.cfg", "pyproject.toml", "requirements.txt"); settings = { |
