mirror of
https://github.com/tuxdotrs/tnvim.git
synced 2025-07-06 21:36:34 +05:30
add templ lsp
This commit is contained in:
@ -71,5 +71,7 @@
|
||||
hunspell
|
||||
hunspellDicts.en_US
|
||||
galaxy-buds-client
|
||||
air
|
||||
templ
|
||||
];
|
||||
}
|
||||
|
@ -50,3 +50,5 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
|
||||
-- load neovide
|
||||
require("neovide")
|
||||
|
||||
vim.filetype.add({ extension = { templ = "templ" } })
|
||||
|
@ -4,7 +4,7 @@ local capabilities = configs.capabilities
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
local servers = { "tailwindcss", "eslint", "gopls" }
|
||||
local servers = { "eslint", "gopls", "templ" }
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup({
|
||||
@ -16,6 +16,7 @@ end
|
||||
lspconfig.nil_ls.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = { "nix" },
|
||||
cmd = { "nil" },
|
||||
settings = {
|
||||
["nil"] = {
|
||||
@ -25,3 +26,22 @@ lspconfig.nil_ls.setup({
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.html.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = { "html", "templ" },
|
||||
})
|
||||
|
||||
lspconfig.htmx.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = { "html", "templ" },
|
||||
})
|
||||
|
||||
lspconfig.tailwindcss.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = { "templ", "astro", "javascript", "typescript", "react" },
|
||||
init_options = { userLanguages = { templ = "html" } },
|
||||
})
|
||||
|
@ -25,6 +25,7 @@ M.treesitter = {
|
||||
"gomod",
|
||||
"gowork",
|
||||
"gosum",
|
||||
"templ",
|
||||
|
||||
-- rust
|
||||
"rust",
|
||||
@ -41,6 +42,7 @@ M.mason = {
|
||||
-- web dev
|
||||
"css-lsp",
|
||||
"html-lsp",
|
||||
"htmx-lsp",
|
||||
"prettier",
|
||||
"prettierd",
|
||||
"eslint-lsp",
|
||||
@ -52,6 +54,7 @@ M.mason = {
|
||||
|
||||
-- go
|
||||
"gopls",
|
||||
"templ",
|
||||
|
||||
-- rust
|
||||
"codelldb",
|
||||
|
Reference in New Issue
Block a user