aboutsummaryrefslogtreecommitdiffstats
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorRaphael <glepnir@neovim.pro>2023-05-09 15:10:14 +0800
committerGitHub <noreply@github.com>2023-05-09 15:10:14 +0800
commit4a69ad6646eaad752901413c9a0dced73dfb562d (patch)
tree271347f8f086c7e7e32eff5db954cd5152162935 /CONTRIBUTING.md
parentfix: check root already in workspace (#2590) (diff)
downloadnvim-lspconfig-4a69ad6646eaad752901413c9a0dced73dfb562d.tar
nvim-lspconfig-4a69ad6646eaad752901413c9a0dced73dfb562d.tar.gz
nvim-lspconfig-4a69ad6646eaad752901413c9a0dced73dfb562d.tar.bz2
nvim-lspconfig-4a69ad6646eaad752901413c9a0dced73dfb562d.tar.lz
nvim-lspconfig-4a69ad6646eaad752901413c9a0dced73dfb562d.tar.xz
nvim-lspconfig-4a69ad6646eaad752901413c9a0dced73dfb562d.tar.zst
nvim-lspconfig-4a69ad6646eaad752901413c9a0dced73dfb562d.zip
fix: use exepath on server command (#2595)
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md16
1 files changed, 2 insertions, 14 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2d04b23f..a2b6c13c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -28,12 +28,7 @@ When choosing a server name, convert all dashes (`-`) to underscores (`_`) If th
Note that Windows has a limitation when it comes to directly invoking a server that's installed by `npm` or `gem`, so it requires additional handling.
```lua
-local bin_name = 'typescript-language-server'
-local cmd = { bin_name, '--stdio' }
-
-if vim.fn.has 'win32' == 1 then
- cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
-end
+cmd = { 'typescript-language-server', '--stdio' }
```
* `filetypes`: a list for filetypes a
@@ -49,13 +44,6 @@ An example for adding a new language server is shown below for `pyright`, a pyth
```lua
local util = require 'lspconfig.util'
-local bin_name = 'pyright-langserver'
-local cmd = { bin_name, '--stdio' }
-
-if vim.fn.has 'win32' == 1 then
- cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
-end
-
local root_files = {
'pyproject.toml',
'setup.py',
@@ -75,7 +63,7 @@ end
return {
default_config = {
- cmd = cmd,
+ cmd = { 'pyright-langserver', '--stdio' },
filetypes = { 'python' },
root_dir = util.root_pattern(unpack(root_files)),
single_file_support = true,