Update neovim setup

Switch from pyright to python-lsp-server
This commit is contained in:
Sonny Bakker 2023-08-04 10:29:11 +02:00
parent 9891f205f4
commit b0cdf7b854
6 changed files with 47 additions and 38 deletions

View file

@ -23,7 +23,9 @@ end
--enable some language servers with the additional completion capabilities
--offered by nvim-cmp
local servers = { 'ansiblels', 'yamlls', 'cssls', 'jsonls', 'tsserver', }
local servers = {
'ansiblels', 'yamlls', 'cssls', 'jsonls', 'tsserver', 'bashls', 'lua_ls'
}
--add additional capabilities supported by nvim-cmp
local capabilities = vim.lsp.protocol.make_client_capabilities()
@ -40,9 +42,19 @@ end
local util = require('lspconfig/util')
nvim_lsp.pyright.setup({
nvim_lsp.pylsp.setup({
on_attach = on_attach,
capabilities = capabilities,
cmd = { 'pylsp', '--verbose' },
settings = {
pylsp = {
plugins = {
ruff = {
enabled = true
}
}
}
},
root_dir = function(fname)
return util.root_pattern('.git', 'setup.cfg', 'requirements')(fname) or
util.path.dirname(fname)