♻️ refactor(nvim): moved python lsp definition to the python extra and added some options to the basedpyright lsp

This commit is contained in:
Sergio Laín 2024-03-23 12:33:12 +01:00
parent 01d799483b
commit 5b81cb636f
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
2 changed files with 25 additions and 4 deletions

View file

@ -50,7 +50,3 @@ if vim.fn.has("nvim-0.10") == 1 then
end
o.conceallevel = 2
-- LSP Server to use for Python.
-- Set to "basedpyright" to use basedpyright instead of pyright.
vim.g.lazyvim_python_lsp = "basedpyright"

View file

@ -1,3 +1,7 @@
-- LSP Server to use for Python.
-- Set to "basedpyright" to use basedpyright instead of pyright.
vim.g.lazyvim_python_lsp = "basedpyright"
return {
{ import = "lazyvim.plugins.extras.lang.python" },
{ import = "lazyvim.plugins.extras.lang.python-semshi" },
@ -5,6 +9,27 @@ return {
"neovim/nvim-lspconfig",
opts = {
servers = {
---@type lspconfig.options.basedpyright
basedpyright = {
settings = {
basedpyright = {
analysis = {
diagnosticSeverityOverrides = {
reportUnusedCallResult = "information",
reportUnusedExpression = "information",
reportUnknownMemberType = "none",
reportUnknownLambdaType = "none",
reportUnknownParameterType = "none",
reportMissingParameterType = "none",
reportUnknownVariableType = "none",
reportUnknownArgumentType = "none",
reportAny = "none",
},
},
},
},
},
---@type lspconfig.options.pyright
pyright = {
settings = {
verboseOutput = true,