nvim: lsp: Enable flake8 & pylint for pylsp

See documentation
https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md
This commit is contained in:
Sanchayan Maity 2021-11-29 11:54:53 +05:30
parent 3be8a76fe7
commit 818a34a7ff
1 changed files with 23 additions and 8 deletions

View File

@ -187,14 +187,6 @@ local rust_tool_opts = {
},
}
local servers = { 'hls', 'pylsp' }
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
on_attach = on_attach,
capabilities = capabilities
}
end
nvim_lsp.clangd.setup {
on_attach = on_attach,
capabilities = capabilities,
@ -211,6 +203,29 @@ nvim_lsp.clangd.setup {
}
}
nvim_lsp.hls.setup {
on_attach = on_attach,
capabilities = capabilities
}
nvim_lsp.pylsp.setup {
on_attach = on_attach,
capabilities = capabilities,
settings = {
pylsp = {
plugins = {
flake8 = {
enabled = true,
config = vim.fn.expand('~/.config/flake8')
},
pylint = {
enabled = true,
}
}
}
}
}
require('rust-tools').setup(rust_tool_opts)
nvim_lsp.tsserver.setup {