mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
update nvim-lsp config
This commit is contained in:
parent
82a97710c8
commit
aeea5f18f5
@ -356,6 +356,9 @@ local on_attach = function(client, bufnr)
|
|||||||
augroup END
|
augroup END
|
||||||
]], false)
|
]], false)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local msg = string.format('Language server %s started!' , client.name)
|
||||||
|
vim.api.nvim_echo({{msg, 'MoreMsg'}, }, false, {})
|
||||||
end
|
end
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
@ -377,13 +380,15 @@ lspconfig.pyls.setup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- set up ccls, see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#ccls
|
-- set up ccls, see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#ccls
|
||||||
lspconfig.ccls.setup {
|
if vim.fn.executable('ccls') then
|
||||||
on_attach = on_attach,
|
lspconfig.ccls.setup {
|
||||||
root_dir = lspconfig.util.root_pattern("compile_commands.json", ".ccls", ".git"),
|
on_attach = on_attach,
|
||||||
init_options = {
|
root_dir = lspconfig.util.root_pattern("compile_commands.json", ".ccls", ".git"),
|
||||||
highlight = { lsRanges = true }
|
init_options = {
|
||||||
|
highlight = { lsRanges = true }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
end
|
||||||
|
|
||||||
-- set up vim-language-server
|
-- set up vim-language-server
|
||||||
lspconfig.vimls.setup{ on_attach = on_attach }
|
lspconfig.vimls.setup{ on_attach = on_attach }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user