nvim-config/after/lsp/pyright.lua
2025-08-10 20:24:22 +00:00

44 lines
1.0 KiB
Lua

local new_capability = {
-- remove some of the diagnostics that duplicates those from ruff
textDocument = {
publishDiagnostics = {
tagSupport = {
valueSet = { 2 },
},
},
hover = {
contentFormat = { "plaintext" },
dynamicRegistration = true,
},
},
}
return {
cmd = { "delance-langserver", "--stdio" },
settings = {
pyright = {
-- disable import sorting and use ruff for this
disableOrganizeImports = true,
disableTaggedHints = false,
},
python = {
analysis = {
autoSearchPaths = true,
diagnosticMode = "workspace",
typeCheckingMode = "standard",
useLibraryCodeForTypes = true,
diagnosticSeverityOverrides = {
deprecateTypingAliases = false,
},
inlayHints = {
callArgumentNames = "partial",
functionReturnTypes = true,
pytestParameters = true,
variableTypes = true,
},
},
},
},
capabilities = new_capability,
}