feat: python lsp server configuration
This commit is contained in:
@@ -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
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user