updated tsserver to ts_ls, added handlebars stuff

This commit is contained in:
2024-09-26 23:24:53 -05:00
parent 2c75243026
commit 0b02a08930
+13 -13
View File
@@ -205,6 +205,7 @@ function M.nvim_treesitter()
"html", "html",
"query", "query",
"bash", "bash",
"glimmer",
}, },
highlight = { highlight = {
enable = true, enable = true,
@@ -394,20 +395,20 @@ function M.lsp_zero()
"bashls", "bashls",
"html", "html",
"cssls", "cssls",
"tsserver", "ts_ls",
"svelte", "svelte",
"angularls", "angularls",
"tailwindcss", "tailwindcss",
--"templ", "templ",
--"gopls", "gopls",
--"htmx", "htmx",
}) })
lsp.configure("pyright", { lsp.configure("pyright", {
root_dir = lsp_config_defaults().root_dir, root_dir = lsp_config_defaults().root_dir,
}) })
lsp.configure("tsserver", { lsp.configure("ts_ls", {
settings = { settings = {
implicitProjectConfiguration = { implicitProjectConfiguration = {
checkJs = true, checkJs = true,
@@ -415,13 +416,10 @@ function M.lsp_zero()
}, },
}) })
lsp.configure("html", { local html_filetypes = { "html", "htmldjango", "templ", "glimmer" }
filetypes = { "html", "htmldjango", "templ" },
})
lsp.configure("htmx", { lsp.configure("html", { filetypes = html_filetypes })
filetypes = { "html", "htmldjango", "templ" }, lsp.configure("htmx", { filetypes = html_filetypes })
})
require("mason-lspconfig").setup_handlers({ require("mason-lspconfig").setup_handlers({
["rust_analyzer"] = function() end, ["rust_analyzer"] = function() end,
@@ -449,8 +447,10 @@ function M.undotree()
end end
function M.luasnip() function M.luasnip()
require("luasnip").filetype_extend("htmldjango", { "html" }) local luasnip = require("luasnip")
require("luasnip").filetype_extend("templ", { "html" }) luasnip.filetype_extend("htmldjango", { "html" })
luasnip.filetype_extend("templ", { "html" })
luasnip.filetype_extend("handlebars", { "html" })
require("luasnip.loaders.from_snipmate").load() require("luasnip.loaders.from_snipmate").load()
end end