astro-nvim-v3 - change: turn off declare symbols basedpyright

This commit is contained in:
huyjaky
2025-08-10 15:18:07 +07:00
parent df896f0ab4
commit 182ad7856a
27 changed files with 1114 additions and 807 deletions

View File

@@ -1,74 +1,38 @@
return {
before_init = function(_, c)
if not c.settings then c.settings = {} end
if not c.settings.python then c.settings.python = {} end
c.settings.python.pythonPath = vim.fn.exepath "python"
end,
settings = {
basedpyright = {
disableOrganizeImports = true,
-- disableLanguageServices = true,
autoImportCompletions = false,
disableTaggedHints = true,
useLibraryCodeForTypes = false,
analysis = {
-- diagnosticMode = "workspace",
diagnosticMode = "openFilesOnly",
typeCheckingMode = "basic",
autoImportCompletions = false,
autoSearchPath = false,
indexing = false,
inlayHints = {
variableTypes = true,
functionReturnTypes = false,
callArgumentNames = false,
pytestParameters = true,
},
useLibraryCodeForTypes = false,
deprecateTypingAliases = false,
enableReachabilityAnalysis = false,
before_init = function(_, c)
if not c.settings then
c.settings = {}
end
if not c.settings.python then
c.settings.python = {}
end
c.settings.python.pythonPath = vim.fn.exepath("python")
end,
settings = {
basedpyright = {
disableLanguageServices = false,
disableOrganizeImports = true,
disableTaggedHints = true,
strictListInference = true,
strictDictionaryInference = true,
strictSetInference = true,
analyzeUnannotatedFunctions = false,
-- ignore = { "**/*.py" },
reportGeneralTypeIssues = false,
diagnosticSeverityOverrides = {
reportUnusedImport = false,
reportUnusedFunction = false,
reportUnusedVariable = false,
reportGeneralTypeIssues = false,
reportOptionalMemberAccess = false,
reportOptionalSubscript = false,
reportPrivateImportUsage = false,
reportInvalidStubStatement = false,
reportIncompleteStub = false,
reportArgumentType = false,
reportAttributeAccessIssue = false,
-- reportCallIssue = false,
-- reportNoOverloadImplementation = false,
-- reportOverlappingOverload = false,
-- reportInconsistentOverload = false,
-- reportUnknownMemberType = false,
-- reportFunctionMemberAccess = false,
-- reportPropertyTypeMismatch = false,
-- reportMatchNotExhaustive = false,
-- reportInvalidTypeForm = false,
-- reportAbstractUsage = false,
-- reportAssertTypeFailure = false,
-- reportAssignmentType = false,
-- reportIndexIssue = false,
-- reportInvalidTypeArguments = false,
-- reportOperatorIssue = false,
-- reportOptionalCall = false,
-- reportOptionalIterable = false,
},
},
},
},
analysis = {
autoSearchPath = false,
logLevel = "Trace",
typeCheckingMode = "standard",
deprecateTypingAliases = false,
inlayHints = {
variableTypes = true,
functionReturnTypes = true,
callArgumentNames = true,
pytestParameters = true,
},
ignore = {
"unsloth_compiled_cache",
"__pycache__",
"__index__",
},
useLibraryCodeForTypes = true,
},
autoImportCompletions = false,
},
},
}

View File

@@ -0,0 +1,30 @@
return {
init_options = {
completion = {
disableSnippets = true,
},
diagnostics = {
enable = false,
},
hover = {
enable = true,
},
workspace = {
environmentPath = "/home/duckq1u/miniconda3/envs/OCR3/bin/python",
ignore = {
"/home/duckq1u/miniconda3/envs/OCR3/lib/python3.11/site-packages/transformers/mode ls/albert/configuration_albert.py",
},
},
jediSettings = {
autoImportModules = {
"numpy",
"pandas",
"torch",
-- "torchmetrics",
-- "pytorch_lightning",
},
},
},
}

View File

@@ -0,0 +1,16 @@
return {
settings = {
pylsp = {
plugins = {
pyflakes = { enabled = false }, -- disable pyflakes
pycodestyle = { enabled = false }, -- disable pycodestyle
flake8 = { enabled = false }, -- disable flake8
yapf = { enabled = false }, -- disable yapf
mcabe = { enabled = false }, -- disable mccabe
pylsp_black = { enabled = false }, -- disable black
pylsp_mypy = { enabled = false }, -- disable mypy
pylsp_isort = { enabled = false }, -- disable isort
},
},
},
}

View File

@@ -0,0 +1,26 @@
return {
before_init = function(_, c)
if not c.settings then
c.settings = {}
end
if not c.settings.python then
c.settings.python = {}
end
c.settings.python.pythonPath = vim.fn.exepath("python")
end,
settings = {
pyright = {
disableLanguageServices = false,
disableOrganizeImports = true,
analysis = {
-- diagnosticMode = "openFilesOnly",
typeCheckingMode = "standard",
autoSearchPath = true,
-- diagnosticSeverityOverrides = false,
logLevel = "Trace",
},
},
-- python = {
-- },
},
}

View File

@@ -0,0 +1,56 @@
return {
init_options = {
settings = {
lint = {
unfixable = { "F401" },
select = {
"ALL",
},
ignore = {
"ANN",
"COM",
"C90",
"DJ",
"EXE",
"T10",
"TID",
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"D200",
"D205",
"D212",
"D400",
"D401",
"D415",
"E402",
"E501",
"ERA001",
"TRY003",
"TD002",
"TD003",
"T201",
"FIX002",
"N803",
"PD901",
-- "F401",
"I001",
"RET504",
"PLR2004",
"W291",
"PLW2901",
"D213",
"D202",
"PLR0402",
},
},
args = {},
},
},
}

View File

@@ -1,59 +1,59 @@
return {
-- LSP
ActiveLSP = "",
ActiveTS = "",
LSPLoaded = "",
LSPLoading1 = "",
LSPLoading2 = "",
LSPLoading3 = "",
LSPLoading4 = "",
LSPLoading5 = "",
LSPLoading6 = "",
LSPLoading7 = "",
LSPLoading8 = "",
LSPLoading9 = "",
LSPLoading10 = "",
ActiveLSP = " ",
ActiveTS = " ",
LSPLoaded = " ",
LSPLoading1 = " ",
LSPLoading2 = " ",
LSPLoading3 = " ",
LSPLoading4 = " ",
LSPLoading5 = " ",
LSPLoading6 = " ",
LSPLoading7 = " ",
LSPLoading8 = " ",
LSPLoading9 = " ",
LSPLoading10 = " ",
-- Git
Github = "",
GitAdd = "",
GitBranch = "",
GitChange = "",
GitConflict = "",
GitDelete = "",
GitIgnored = "",
GitRenamed = "",
GitStaged = "",
GitUnstaged = "",
GitUntracked = "",
Neogit = "",
Github = " ",
GitAdd = " ",
GitBranch = " ",
GitChange = " ",
GitConflict = " ",
GitDelete = " ",
GitIgnored = " ",
GitRenamed = " ",
GitStaged = " ",
GitUnstaged = " ",
GitUntracked = " ",
Neogit = " ",
-- Files
Ellipsis = "",
DefaultFile = "",
FileModified = "",
FileReadOnly = "",
FoldClosed = "",
FoldOpened = "",
FolderClosed = "",
FolderEmpty = "",
FolderOpen = "",
Ellipsis = " ",
DefaultFile = " ",
FileModified = " ",
FileReadOnly = " ",
FoldClosed = " ",
FoldOpened = " ",
FolderClosed = " ",
FolderEmpty = " ",
FolderOpen = " ",
-- DAP
DapBreakpoint = "",
DapBreakpointCondition = "",
DapBreakpointRejected = "",
DapLogPoint = "",
DapStopped = "",
DapBreakpoint = " ",
DapBreakpointCondition = " ",
DapBreakpointRejected = " ",
DapLogPoint = " ",
DapStopped = " ",
-- Diagnostics
Diagnostic = " 󰒡 ",
DiagnosticError = "",
DiagnosticHint = "",
DiagnosticInfo = "󰋼",
DiagnosticWarn = "",
Diagnostic = " 󰒡 ",
DiagnosticError = " ",
DiagnosticHint = " ",
DiagnosticInfo = "󰋼 ",
DiagnosticWarn = " ",
-- Misc
Mode = "     ",
FileEncoding = "",
ScrollText = "",
TabWidth = "",
Search = "",
Grapple = "󰓹",
Codeium = "󱚝",
Mode = "     ",
FileEncoding = " ",
ScrollText = " ",
TabWidth = " ",
Search = " ",
Grapple = "󰓹 ",
Codeium = "󱚝 ",
}

View File

@@ -1,38 +1,38 @@
-- LSP kind symbol map
return {
Array = "",
Boolean = "",
Class = "",
Color = "",
Constant = "",
Constructor = "",
Enum = "",
EnumMember = "",
Event = "",
Field = "",
File = "",
Folder = "",
Function = "",
Interface = "",
Key = "",
Keyword = "󰌋",
Method = "",
Module = "",
Namespace = "",
Null = "",
Number = "",
Object = "",
Operator = "",
Package = "",
Property = "",
Reference = "",
Snippet = "󰗀",
String = "",
Struct = "",
Text = "󰉿",
TypeParameter = "",
Unit = "",
Value = "",
Variable = "",
Array = " ",
Boolean = " ",
Class = " ",
Color = " ",
Constant = " ",
Constructor = " ",
Enum = " ",
EnumMember = " ",
Event = " ",
Field = " ",
File = " ",
Folder = " ",
Function = "",
Interface = " ",
Key = " ",
Keyword = "󰌋 ",
Method = " ",
Module = " ",
Namespace = " ",
Null = " ",
Number = " ",
Object = " ",
Operator = " ",
Package = " ",
Property = " ",
Reference = " ",
Snippet = "󰗀 ",
String = " ",
Struct = " ",
Text = "󰉿 ",
TypeParameter = " ",
Unit = " ",
Value = " ",
Variable = " ",
}