feat: use templ if it is installed in path

This commit is contained in:
Guz
2025-01-03 10:19:40 -03:00
parent bff3f7b24e
commit f210c68bc2
2 changed files with 11 additions and 2 deletions

View File

@@ -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