From 06c04d64e301132eb56f5bdd199a605f81f7c356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20H=C3=A5kansson?= Date: Mon, 26 Feb 2024 10:51:01 +0100 Subject: [PATCH] Fix GO templ lsp stuff --- init.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 6a9a5062..b73fa9e5 100644 --- a/init.lua +++ b/init.lua @@ -625,6 +625,9 @@ require('which-key').register({ require('mason').setup() require('mason-lspconfig').setup() +-- Go templ language server, treesitter etc... needs to recongize the .templ file type +vim.filetype.add({ extension = { templ = 'templ' } }) + -- Enable the following language servers -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. -- @@ -636,6 +639,7 @@ require('mason-lspconfig').setup() local servers = { clangd = {}, eslint = {}, + templ = {}, gopls = { gofumpt = true, usePlaceholders = true, @@ -681,7 +685,10 @@ local servers = { }, rust_analyzer = {}, -- tsserver = {}, - html = { filetypes = { 'html', 'twig', 'hbs' } }, + html = { filetypes = { 'html', 'templ', 'twig', 'hbs' } }, + htmx = { filetypes = { 'html', 'templ' } }, + tailwindcss = { filetypes = { 'html', 'templ', 'astro', 'javascript', 'typescript', 'react' } }, + emmet_ls = { filetypes = { 'html', 'templ', 'astro', 'javascript', 'typescript', 'react' } }, lua_ls = { Lua = { workspace = { checkThirdParty = false },