51 lines
1.1 KiB
Lua
51 lines
1.1 KiB
Lua
vim.lsp.config("pylsp", {
|
|
settings = {
|
|
pylsp = {
|
|
plugins = {
|
|
pycodestyle = {
|
|
ignore = { "W391", "E501" },
|
|
maxLineLength = 100,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|
|
|
|
vim.lsp.config('basedpyright', {
|
|
cmd = { 'basedpyright-langserver', '--stdio' },
|
|
filetypes = { 'python' },
|
|
root_markers = {
|
|
'pyproject.toml',
|
|
'setup.py',
|
|
'setup.cfg',
|
|
'requirements.txt',
|
|
'Pipfile',
|
|
'pyrightconfig.json',
|
|
'.git',
|
|
},
|
|
settings = {
|
|
basedpyright = {
|
|
analysis = {
|
|
|
|
diagnosticSeverityOverrides = {
|
|
reportAny = false,
|
|
reportOptionalOperand = "warning",
|
|
reportOptionalMemberAccess = false,
|
|
reportOptionalSubscript = false,
|
|
reportAttributeAccessIssue = false,
|
|
reportMissingTypeArgument = false,
|
|
reportMissingTypeStubs = false,
|
|
reportUnknownArgumentType = false,
|
|
reportUnknownMemberType = false,
|
|
reportUnknownParameterType = false,
|
|
reportUnknownVariableType = false,
|
|
reportUnusedCallResult = false,
|
|
},
|
|
autoSearchPaths = true,
|
|
useLibraryCodeForTypes = true,
|
|
diagnosticMode = 'openFilesOnly',
|
|
typeCheckingMode = 'basic',
|
|
},
|
|
},
|
|
},
|
|
})
|