aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsitiom <sitiom@disroot.org>2022-02-12 23:49:54 +0800
committerGitHub <noreply@github.com>2022-02-12 07:49:54 -0800
commitfad98f89c7111c1fb738c71353e3cfefdcde949b (patch)
tree7a1e4f16bcf4bb1425f7dc443fc5f26d40e07783
parentfeat: remove warning when server fails to start (#1711) (diff)
downloadnvim-lspconfig-fad98f89c7111c1fb738c71353e3cfefdcde949b.tar
nvim-lspconfig-fad98f89c7111c1fb738c71353e3cfefdcde949b.tar.gz
nvim-lspconfig-fad98f89c7111c1fb738c71353e3cfefdcde949b.tar.bz2
nvim-lspconfig-fad98f89c7111c1fb738c71353e3cfefdcde949b.tar.lz
nvim-lspconfig-fad98f89c7111c1fb738c71353e3cfefdcde949b.tar.xz
nvim-lspconfig-fad98f89c7111c1fb738c71353e3cfefdcde949b.tar.zst
nvim-lspconfig-fad98f89c7111c1fb738c71353e3cfefdcde949b.zip
fix(grammarly): resolve windows command properly (#1716)
-rw-r--r--lua/lspconfig/server_configurations/grammarly.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/lua/lspconfig/server_configurations/grammarly.lua b/lua/lspconfig/server_configurations/grammarly.lua
index 310f903d..675169da 100644
--- a/lua/lspconfig/server_configurations/grammarly.lua
+++ b/lua/lspconfig/server_configurations/grammarly.lua
@@ -1,8 +1,15 @@
local util = require 'lspconfig.util'
+local bin_name = 'unofficial-grammarly-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
return {
default_config = {
- cmd = { 'unofficial-grammarly-language-server', '--stdio' },
+ cmd = cmd,
filetypes = { 'markdown' },
root_dir = util.find_git_ancestor,
single_file_support = true,