feat(lsp): use jedi+pyright until pyrefly is more mature
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
---@type ServerConfig
|
||||||
|
return {
|
||||||
|
mason = { "jedi-language-server" },
|
||||||
|
lspconfig = {
|
||||||
|
filetypes = {
|
||||||
|
"python",
|
||||||
|
},
|
||||||
|
cmd = { "jedi-language-server" },
|
||||||
|
single_file_support = true,
|
||||||
|
init_options = {
|
||||||
|
completion = {
|
||||||
|
disableSnippets = true,
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
@@ -2,6 +2,7 @@ local util = require("lspconfig.util")
|
|||||||
|
|
||||||
---@type ServerConfig
|
---@type ServerConfig
|
||||||
return {
|
return {
|
||||||
|
enable = false,
|
||||||
dependencies = { "pyrefly" },
|
dependencies = { "pyrefly" },
|
||||||
lspconfig = {
|
lspconfig = {
|
||||||
cmd = { "pyrefly", "lsp" },
|
cmd = { "pyrefly", "lsp" },
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
---@type ServerConfig
|
||||||
|
return {
|
||||||
|
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",
|
||||||
|
stubPath = "stubs",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pyright = {
|
||||||
|
disableLanguageServices = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user