fix: replace pylint with pyright
This commit is contained in:
@@ -97,32 +97,6 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
cmd = {
|
||||
"pylint",
|
||||
"--disable=all",
|
||||
"--enable=E1101",
|
||||
"--output-format=json",
|
||||
"--from-stdin",
|
||||
"%file%",
|
||||
},
|
||||
stdin = true,
|
||||
stdout = true,
|
||||
json = {
|
||||
lnum = "line",
|
||||
end_lnum = "endLine",
|
||||
col = "column",
|
||||
end_col = "endColumn",
|
||||
code = "message-id",
|
||||
message = "message",
|
||||
severity = "type",
|
||||
},
|
||||
zero_idx_col = true,
|
||||
severity_map = {
|
||||
error = ERROR,
|
||||
},
|
||||
source = "pylint",
|
||||
},
|
||||
},
|
||||
keymaps = {
|
||||
{
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
---@type ServerConfig
|
||||
return {
|
||||
enable = true,
|
||||
mason = { "pyright" },
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
"python",
|
||||
},
|
||||
cmd = { "pyright-langserver", "--stdio" },
|
||||
single_file_support = true,
|
||||
-- https://microsoft.github.io/pyright/#/settings
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
autoSearchPaths = true,
|
||||
diagnosticMode = "openFilesOnly",
|
||||
useLibraryCodeForTypes = true,
|
||||
typeCheckingMode = "strict",
|
||||
},
|
||||
},
|
||||
pyright = {
|
||||
disableLanguageServices = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user