This commit is contained in:
2026-01-21 17:25:34 +11:00
parent e0046ccf1a
commit 7433ea1af1
7 changed files with 115 additions and 62 deletions

View File

@@ -22,52 +22,35 @@ return {
},
{
"neovim/nvim-lspconfig",
event = "LazyFile",
opts = {
servers = {
templ = {
filetypes = { "templ" },
settings = {
templ = {
enable_snippets = true,
},
},
opts = function(_, opts)
local capabilities = require("blink-cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
-- apply to ALL servers
opts.servers["*"].capabilities = capabilities
opts.servers = opts.servers or {}
opts.servers.templ = {
cmd = { "templ", "lsp" },
filetypes = { "templ" },
root_dir = require("lspconfig.util").root_pattern("go.work", "go.mod", ".git"),
capabilities = capabilities,
}
opts.servers.html = {
filetypes = { "html", "templ" },
capabilities = capabilities,
}
opts.servers.tailwindcss = {
filetypes = {
"html",
"templ",
"javascript",
"typescript",
"javascriptreact",
"typescriptreact",
},
},
},
},
{
"nvim-treesitter/nvim-treesitter",
event = { "LazyFile", "VeryLazy" },
opts_extend = { "ensure_installed" },
opts = {
highlight = { enable = true },
indent = { enable = true },
ensure_installed = {
"bash",
"c",
"diff",
"go",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"printf",
"query",
"toml",
"vim",
"vimdoc",
"yaml",
"templ",
"typescript",
},
},
capabilities = capabilities,
}
end,
},
{
"stevearc/conform.nvim",