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 >>>
|
-- lspconfig >>>
|
||||||
M.lspconfig = function()
|
M.lspconfig = function()
|
||||||
local nvim_lsp = require('lspconfig')
|
local nvim_lsp = require('lspconfig')
|
||||||
|
|
||||||
-- Keybinds for servers >>>
|
-- Keybinds for servers >>>
|
||||||
-- Use an on_attach function to only map the following keys
|
-- Use an on_attach function to only map the following keys
|
||||||
-- after the language server attaches to the current buffer
|
-- 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>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||||
buf_set_keymap('n', '<leader>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
buf_set_keymap('n', '<leader>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||||
end -- <<<
|
end -- <<<
|
||||||
|
|
||||||
-- Load servers >>>
|
-- Load servers >>>
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- map buffer local keybindings when the language server attaches
|
||||||
|
@ -212,7 +210,7 @@ M.lspconfig = function()
|
||||||
bashls = 'bash-language-server',
|
bashls = 'bash-language-server',
|
||||||
}
|
}
|
||||||
for lsp, exe in pairs(lsp_servers) do
|
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 {
|
nvim_lsp[lsp].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = {
|
flags = {
|
||||||
|
@ -221,7 +219,7 @@ M.lspconfig = function()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Custom servers >>>
|
-- Custom servers
|
||||||
-- lua >>>
|
-- lua >>>
|
||||||
local sumneko_root_path
|
local sumneko_root_path
|
||||||
local sumneko_binary
|
local sumneko_binary
|
||||||
|
@ -271,7 +269,6 @@ M.lspconfig = function()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
-- lua <<<
|
-- lua <<<
|
||||||
-- Custom servers <<<
|
|
||||||
-- Load servers <<<
|
-- Load servers <<<
|
||||||
end -- <<<
|
end -- <<<
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue