feat(lsp): use jedi+pyright until pyrefly is more mature

This commit is contained in:
2025-05-21 12:11:58 +02:00
parent 543e04b2bb
commit c569c12ae7
3 changed files with 48 additions and 0 deletions
@@ -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,
},
},
},
}
+1
View File
@@ -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" },
+27
View File
@@ -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,
},
},
},
}