nvim: lsp: add pylsp and lemminx, don't overwrite <Leader>c

This commit is contained in:
tastytea 2022-08-10 21:23:50 +02:00
parent 6b9e33f4d5
commit c748569a5a
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 22 additions and 1 deletions

View File

@ -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({

View File

@ -27,7 +27,7 @@ packer.use {
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end)
maplsp('n', '<Leader>rn', vim.lsp.buf.rename)
maplsp('n', '<Leader>ca', vim.lsp.buf.code_action)
maplsp('n', '<Leader>a', vim.lsp.buf.code_action)
maplsp('n', 'gr', vim.lsp.buf.references)
maplsp('n', '<Leader>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
}