Fix GO templ lsp stuff
This commit is contained in:
		
							parent
							
								
									6d751b38f1
								
							
						
					
					
						commit
						06c04d64e3
					
				
							
								
								
									
										9
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										9
									
								
								init.lua
								
								
								
								
							| 
						 | 
					@ -625,6 +625,9 @@ require('which-key').register({
 | 
				
			||||||
require('mason').setup()
 | 
					require('mason').setup()
 | 
				
			||||||
require('mason-lspconfig').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
 | 
					-- Enable the following language servers
 | 
				
			||||||
--  Feel free to add/remove any LSPs that you want here. They will automatically be installed.
 | 
					--  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 = {
 | 
					local servers = {
 | 
				
			||||||
  clangd = {},
 | 
					  clangd = {},
 | 
				
			||||||
  eslint = {},
 | 
					  eslint = {},
 | 
				
			||||||
 | 
					  templ = {},
 | 
				
			||||||
  gopls = {
 | 
					  gopls = {
 | 
				
			||||||
    gofumpt = true,
 | 
					    gofumpt = true,
 | 
				
			||||||
    usePlaceholders = true,
 | 
					    usePlaceholders = true,
 | 
				
			||||||
| 
						 | 
					@ -681,7 +685,10 @@ local servers = {
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  rust_analyzer = {},
 | 
					  rust_analyzer = {},
 | 
				
			||||||
  -- tsserver = {},
 | 
					  -- 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_ls = {
 | 
				
			||||||
    Lua = {
 | 
					    Lua = {
 | 
				
			||||||
      workspace = { checkThirdParty = false },
 | 
					      workspace = { checkThirdParty = false },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue