feat: python lsp server configuration

This commit is contained in:
Ian
2026-07-15 22:49:37 +02:00
parent 254eca6c11
commit ee42090f4f
2 changed files with 22 additions and 2 deletions
+1
View File
@@ -15,6 +15,7 @@ function Run()
-- Lsp server
{ cmd = "lua-language-server", desc = "lua lsp server" },
{ cmd = "pyright-langserver", desc = "python lsp server" },
-- Test not exists
{ cmd = "fff", desc = "test not exists command" },
+21 -2
View File
@@ -1,4 +1,4 @@
vim.lsp.config["lua_lsp"] = {
vim.lsp.config["lua"] = {
cmd = { "lua-language-server" },
filetypes = { "lua" },
root_markers = { { ".luarc.json", ".luarc.jsonc" }, ".git" },
@@ -10,5 +10,24 @@ vim.lsp.config["lua_lsp"] = {
},
},
}
vim.lsp.enable("lua")
vim.lsp.enable('lua_lsp')
vim.lsp.config["python"] = {
cmd = { "pyright-langserver", "--stdio" },
filetypes = { "python" },
root_markers = {
"pyproject.toml",
".git",
},
settings = {
python = {
analysis = {
autoSearchPaths = true,
diagnosticMode = "workspace",
useLibraryCodeForTypes = true,
},
},
},
}
vim.lsp.enable("python")