♻️ refactor(nvim): moved python lsp definition to the python extra and added some options to the basedpyright lsp
This commit is contained in:
parent
01d799483b
commit
5b81cb636f
2 changed files with 25 additions and 4 deletions
|
@ -50,7 +50,3 @@ if vim.fn.has("nvim-0.10") == 1 then
|
||||||
end
|
end
|
||||||
|
|
||||||
o.conceallevel = 2
|
o.conceallevel = 2
|
||||||
|
|
||||||
-- LSP Server to use for Python.
|
|
||||||
-- Set to "basedpyright" to use basedpyright instead of pyright.
|
|
||||||
vim.g.lazyvim_python_lsp = "basedpyright"
|
|
||||||
|
|
|
@ -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 {
|
return {
|
||||||
{ import = "lazyvim.plugins.extras.lang.python" },
|
{ import = "lazyvim.plugins.extras.lang.python" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.python-semshi" },
|
{ import = "lazyvim.plugins.extras.lang.python-semshi" },
|
||||||
|
@ -5,6 +9,27 @@ return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
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 = {
|
pyright = {
|
||||||
settings = {
|
settings = {
|
||||||
verboseOutput = true,
|
verboseOutput = true,
|
||||||
|
|
Loading…
Add table
Reference in a new issue