Feat: add other languages
This commit is contained in:
parent
a3d16cbff2
commit
46a53b7c38
@ -45,7 +45,7 @@ local on_attach = function(client, bufnr)
|
|||||||
buf_set_keymap('n', '<leader>df', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
|
buf_set_keymap('n', '<leader>df', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
|
||||||
buf_set_keymap('n', '<leader>dp', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
|
buf_set_keymap('n', '<leader>dp', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
|
||||||
-- Get diagnostic on local list
|
-- Get diagnostic on local list
|
||||||
buf_set_keymap('n', '<leader>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
|
buf_set_keymap('n', '<leader>q', '<cmd>lua vim.diagnostic.setloclist()<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)
|
||||||
|
|
||||||
buf_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
buf_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||||
@ -56,7 +56,17 @@ end
|
|||||||
|
|
||||||
-- 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
|
||||||
local servers = { "texlab", "pyright", "vuels", "tsserver", "html" }
|
local servers = {
|
||||||
|
"texlab",
|
||||||
|
"pyright",
|
||||||
|
"vuels",
|
||||||
|
"tsserver",
|
||||||
|
"html",
|
||||||
|
"sumneko_lua",
|
||||||
|
"ansiblels",
|
||||||
|
"arduino_language_server",
|
||||||
|
"clangd",
|
||||||
|
}
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
Loading…
Reference in New Issue
Block a user