Add pylsp config if executable found

This commit is contained in:
Evie Litherland-Smith 2023-06-14 16:06:24 +01:00
parent 88541ecec8
commit d5bdd20a44

View file

@ -51,6 +51,7 @@ local config = function()
}
local lsp = require("lspconfig")
if vim.fn.executable("pyright") == 1 then lsp["pyright"].setup(lsp_config) end
if vim.fn.executable("pylsp") == 1 then lsp["pylsp"].setup(lsp_config) end
if vim.fn.executable("ruff-lsp") == 1 then lsp["ruff_lsp"].setup(lsp_config) end
if vim.fn.executable("lua-language-server") == 1 then lsp["lua_ls"].setup(lsp_config) end
if vim.fn.executable("nil") == 1 then lsp["nil_ls"].setup(lsp_config) end