From 4a69ad6646eaad752901413c9a0dced73dfb562d Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 9 May 2023 15:10:14 +0800 Subject: fix: use exepath on server command (#2595) --- CONTRIBUTING.md | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'CONTRIBUTING.md') 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, -- cgit v1.2.3-70-g09d2