From 46a53b7c38af931e6e52ac2646edf7c5dcc13d32 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sat, 20 Aug 2022 05:56:58 +0200 Subject: [PATCH] Feat: add other languages --- nvim/.config/nvim/lua/lsp.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/lsp.lua b/nvim/.config/nvim/lua/lsp.lua index 5158d8b..3179e09 100644 --- a/nvim/.config/nvim/lua/lsp.lua +++ b/nvim/.config/nvim/lua/lsp.lua @@ -45,7 +45,7 @@ local on_attach = function(client, bufnr) buf_set_keymap('n', 'df', 'lua vim.diagnostic.goto_prev()', opts) buf_set_keymap('n', 'dp', 'lua vim.diagnostic.goto_next()', opts) -- Get diagnostic on local list - buf_set_keymap('n', 'q', 'lua vim.diagnostic.setloclist()', opts) + buf_set_keymap('n', 'q', 'lua vim.diagnostic.setloclist()', opts) buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) @@ -56,7 +56,17 @@ end -- Use a loop to conveniently call 'setup' on multiple servers and -- 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 nvim_lsp[lsp].setup { on_attach = on_attach,