mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-24 12:44:35 +02:00
easy install LSP
This commit is contained in:
parent
353a643170
commit
7367ca68b7
7 changed files with 14 additions and 26 deletions
|
@ -1,22 +1,7 @@
|
|||
-- https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone)
|
||||
USER = vim.fn.expand('$USER')
|
||||
|
||||
local sumneko_root_path = ""
|
||||
local sumneko_binary = ""
|
||||
|
||||
if vim.fn.has("mac") == 1 then
|
||||
sumneko_root_path = "/Users/" .. USER ..
|
||||
"/.config/nvim/.language-servers/lua-language-server"
|
||||
sumneko_binary = "/Users/" .. USER ..
|
||||
"/.config/nvim/.language-servers/lua-language-server/bin/macOS/lua-language-server"
|
||||
elseif vim.fn.has("unix") == 1 then
|
||||
sumneko_root_path = "/home/" .. USER ..
|
||||
"/.config/nvim/.language-servers/lua-language-server"
|
||||
sumneko_binary = "/home/" .. USER ..
|
||||
"/.config/nvim/.language-servers/lua-language-server/bin/Linux/lua-language-server"
|
||||
else
|
||||
print("Unsupported system for sumneko")
|
||||
end
|
||||
-- USER = vim.fn.expand('$USER')
|
||||
local sumneko_root_path = DATA_PATH .. "/lspinstall/lua"
|
||||
local sumneko_binary = sumneko_root_path .. "/sumneko-lua-language-server"
|
||||
|
||||
require'lspconfig'.sumneko_lua.setup {
|
||||
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
|
||||
|
@ -35,10 +20,7 @@ require'lspconfig'.sumneko_lua.setup {
|
|||
},
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
library = {
|
||||
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
|
||||
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true
|
||||
}
|
||||
library = {[vim.fn.expand('$VIMRUNTIME/lua')] = true, [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue