diff --git a/lua/dot013/plugins/lsp.lua b/lua/dot013/plugins/lsp.lua index 633bfd7..95cf214 100644 --- a/lua/dot013/plugins/lsp.lua +++ b/lua/dot013/plugins/lsp.lua @@ -79,7 +79,13 @@ local lsps = { root_dir = nil, }, -- ["tailwindcss"] = {}, - ["templ"] = {}, + ["templ"] = function() + if vim.fn.executable("templ") then + return {} + else + return nil + end + end, ["ts_ls"] = {}, ["rust_analyzer"] = {}, ["unocss"] = function() @@ -103,6 +109,10 @@ return { v = v() end + if v == nil then + return + end + v.capabilities = require("blink.cmp").get_lsp_capabilities(v.capabilities) lsp[k].setup(v) end diff --git a/neovim.nix b/neovim.nix index 3fcbf29..2b67b63 100644 --- a/neovim.nix +++ b/neovim.nix @@ -80,7 +80,6 @@ lua-language-server nil tailwindcss-language-server - templ typescript-language-server rust-analyzer vscode-langservers-extracted