feat(nvim): move basedpyright options to config file instead of lsp
definition
This commit is contained in:
parent
3f3a617ce1
commit
14641d063f
2 changed files with 23 additions and 56 deletions
|
@ -7,62 +7,6 @@ vim.g.lazyvim_python_ruff = "ruff"
|
|||
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.lang.python" },
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
---@type lspconfig.options.basedpyright
|
||||
basedpyright = {
|
||||
settings = {
|
||||
basedpyright = {
|
||||
analysis = {
|
||||
diagnosticSeverityOverrides = {
|
||||
reportMissingTypeStubs = "information", -- import has no type stub file
|
||||
reportIgnoreCommentWithoutRule = "warning",
|
||||
reportUnreachable = "error",
|
||||
reportPrivateLocalImportUsage = "error",
|
||||
reportImplicitRelativeImport = "error",
|
||||
reportInvalidCast = "error",
|
||||
reportMissingSuperCall = false,
|
||||
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,
|
||||
autoImportCompletion = true,
|
||||
python = {
|
||||
analysis = {
|
||||
diagnosticSeverityOverrides = {
|
||||
reportWildcardImportFromLibrary = "none",
|
||||
reportUnusedImport = "information",
|
||||
reportUnusedClass = "information",
|
||||
reportUnusedFunction = "information",
|
||||
},
|
||||
typeCheckingMode = "strict",
|
||||
autoSearchPaths = true,
|
||||
useLibraryCodeForTypes = true,
|
||||
diagnosticMode = "openFilesOnly",
|
||||
indexing = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
|
|
23
.config/nvim/rules/pyrightconfig.json
Normal file
23
.config/nvim/rules/pyrightconfig.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"include": ["src"],
|
||||
"exclude": ["**/node_modules", "**/__pycache__"],
|
||||
|
||||
"typeCheckingMode": "basic",
|
||||
"reportUnusedImport": "none",
|
||||
"reportMissingTypeStubs": "none",
|
||||
"reportIgnoreCommentWithoutRule": "warning",
|
||||
"reportUnreachable": "error",
|
||||
"reportPrivateLocalImportUsage": "error",
|
||||
"reportImplicitRelativeImport": "error",
|
||||
"reportInvalidCast": "error",
|
||||
"reportMissingSuperCall": false,
|
||||
"reportUnusedCallResult": "information",
|
||||
"reportUnusedExpression": "information",
|
||||
"reportUnknownMemberType": "none",
|
||||
"reportUnknownLambdaType": "none",
|
||||
"reportUnknownParameterType": "none",
|
||||
"reportMissingParameterType": "none",
|
||||
"reportUnknownVariableType": "none",
|
||||
"reportUnknownArgumentType": "none",
|
||||
"reportAny": "none"
|
||||
}
|
Loading…
Add table
Reference in a new issue