From ddc2e549b03b194992e306295b2e22bf5f8f9271 Mon Sep 17 00:00:00 2001 From: William Boman Date: Tue, 4 Jan 2022 18:49:57 +0100 Subject: fix(ltex): use .bat extension on Windows (#1628) --- lua/lspconfig/server_configurations/ltex.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/ltex.lua b/lua/lspconfig/server_configurations/ltex.lua index e9b49afb..e5d01a30 100644 --- a/lua/lspconfig/server_configurations/ltex.lua +++ b/lua/lspconfig/server_configurations/ltex.lua @@ -9,9 +9,14 @@ local language_id_mapping = { xhtml = 'xhtml', } +local bin_name = 'ltex-ls' +if vim.fn.has 'win32' == 1 then + bin_name = bin_name .. '.bat' +end + return { default_config = { - cmd = { 'ltex-ls' }, + cmd = { bin_name }, filetypes = { 'bib', 'markdown', 'org', 'plaintex', 'rst', 'rnoweb', 'tex' }, root_dir = util.find_git_ancestor, single_file_support = true, -- cgit v1.2.3-70-g09d2