diff --git a/init.lua b/init.lua index 5e8eac4..9b78066 100644 --- a/init.lua +++ b/init.lua @@ -161,7 +161,7 @@ end require("mappings") require("lsp") vim.cmd("set completeopt+=noselect") -vim.lsp.enable({ "lua_ls", "gh_actions_ls", "gopls", "astro", "nixd", "zls", "ruff", "tflint", "just", "ty" }) +vim.lsp.enable({ "lua_ls", "gh_actions_ls", "gopls", "astro", "nixd", "zls", "ruff", "tflint", "just", "ty", "templ" }) vim.api.nvim_create_autocmd("LspAttach", { callback = function(ev) local client = vim.lsp.get_client_by_id(ev.data.client_id) diff --git a/lsp/templ.lua b/lsp/templ.lua new file mode 100644 index 0000000..09789b5 --- /dev/null +++ b/lsp/templ.lua @@ -0,0 +1,9 @@ +---@brief +--- https://templ.guide + +---@type vim.lsp.Config +return { + cmd = { "templ", "lsp" }, + filetypes = { "templ" }, + root_markers = { "go.work", "go.mod", ".git" }, +}