mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-21 11:14:42 +02:00
[Feature] Allow for custom path to a language server binary (#1043)
This commit is contained in:
parent
9e640fa4d9
commit
0064b446a0
30 changed files with 150 additions and 45 deletions
|
@ -13,6 +13,9 @@ M.config = function()
|
|||
stdin = false,
|
||||
},
|
||||
linters = { "luacheck" },
|
||||
lsp = {
|
||||
path = DATA_PATH .. "/lspinstall/lua/sumneko-lua-language-server",
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -43,11 +46,10 @@ end
|
|||
M.lsp = function()
|
||||
if not require("lv-utils").check_lsp_client_active "sumneko_lua" then
|
||||
-- https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone)
|
||||
local sumneko_root_path = DATA_PATH .. "/lspinstall/lua"
|
||||
local sumneko_binary = sumneko_root_path .. "/sumneko-lua-language-server"
|
||||
local sumneko_main = string.gsub(O.lang.lua.lsp.path, "sumneko-lua-language-server", "main.lua")
|
||||
|
||||
require("lspconfig").sumneko_lua.setup {
|
||||
cmd = { sumneko_binary, "-E", sumneko_root_path .. "/main.lua" },
|
||||
cmd = { O.lang.lua.lsp.path, "-E", sumneko_main },
|
||||
on_attach = require("lsp").common_on_attach,
|
||||
settings = {
|
||||
Lua = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue