nvim: fixed lsp's not loading
This commit is contained in:
parent
6bd7fd8839
commit
c290617fd5
1 changed files with 2 additions and 5 deletions
|
@ -169,7 +169,6 @@ end -- <<<
|
|||
-- lspconfig >>>
|
||||
M.lspconfig = function()
|
||||
local nvim_lsp = require('lspconfig')
|
||||
|
||||
-- Keybinds for servers >>>
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
|
@ -202,7 +201,6 @@ M.lspconfig = function()
|
|||
buf_set_keymap('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
buf_set_keymap('n', '<leader>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||
end -- <<<
|
||||
|
||||
-- Load servers >>>
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
|
@ -212,7 +210,7 @@ M.lspconfig = function()
|
|||
bashls = 'bash-language-server',
|
||||
}
|
||||
for lsp, exe in pairs(lsp_servers) do
|
||||
if (vim.fn.executable(exe) == true) then
|
||||
if (vim.fn.executable(exe)) then
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
flags = {
|
||||
|
@ -221,7 +219,7 @@ M.lspconfig = function()
|
|||
}
|
||||
end
|
||||
end
|
||||
-- Custom servers >>>
|
||||
-- Custom servers
|
||||
-- lua >>>
|
||||
local sumneko_root_path
|
||||
local sumneko_binary
|
||||
|
@ -271,7 +269,6 @@ M.lspconfig = function()
|
|||
}
|
||||
end
|
||||
-- lua <<<
|
||||
-- Custom servers <<<
|
||||
-- Load servers <<<
|
||||
end -- <<<
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue