Update neovim setup
Switch from pyright to python-lsp-server
This commit is contained in:
parent
9891f205f4
commit
b0cdf7b854
6 changed files with 47 additions and 38 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue