From c748569a5ae21ce14d9c12dbc74cd5419602f08f Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 10 Aug 2022 21:23:50 +0200 Subject: [PATCH] nvim: lsp: add pylsp and lemminx, don't overwrite c --- .config/nvim/lua/completion.lua | 6 ++++++ .config/nvim/lua/lsp.lua | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/completion.lua b/.config/nvim/lua/completion.lua index 9cbeae0..b55efd0 100644 --- a/.config/nvim/lua/completion.lua +++ b/.config/nvim/lua/completion.lua @@ -77,6 +77,12 @@ packer.use { require('lspconfig')['sumneko_lua'].setup { capabilities = capabilities } + require('lspconfig')['pylsp'].setup { + capabilities = capabilities + } + require('lspconfig')['lemminx'].setup { + capabilities = capabilities + } cmp.setup.filetype('lua', { sources = cmp.config.sources({ diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua index 75bc949..cb11c7d 100644 --- a/.config/nvim/lua/lsp.lua +++ b/.config/nvim/lua/lsp.lua @@ -27,7 +27,7 @@ packer.use { print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end) maplsp('n', 'rn', vim.lsp.buf.rename) - maplsp('n', 'ca', vim.lsp.buf.code_action) + maplsp('n', 'a', vim.lsp.buf.code_action) maplsp('n', 'gr', vim.lsp.buf.references) maplsp('n', 'f', vim.lsp.buf.formatting) @@ -88,5 +88,20 @@ packer.use { }, on_attach = on_attach } + + require'lspconfig'.pylsp.setup{ + settings = { + pylsp = { + } + }, + on_attach = on_attach + } + + require'lspconfig'.lemminx.setup{ + filetypes = { + 'xml', 'xsd', 'xsl', 'xslt', 'svg', 'gentoo-metadata' + }, + on_attach = on_attach + } end }