From f989158fcc4c35d1c96d74fde8b6c54b9dfdfc4f Mon Sep 17 00:00:00 2001 From: mortezadadgar Date: Sun, 4 Feb 2024 09:46:42 +0330 Subject: feat: add `templ` filetype in html htmx tailwindcss (#2996) * feat(tailwindcss): add `templ` to filetypes * feat(html): add `templ` to filetypes * feat(htmx): add `templ` to filetypes --- lua/lspconfig/server_configurations/html.lua | 2 +- lua/lspconfig/server_configurations/htmx.lua | 2 +- lua/lspconfig/server_configurations/tailwindcss.lua | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/html.lua b/lua/lspconfig/server_configurations/html.lua index e432e2c8..23707349 100644 --- a/lua/lspconfig/server_configurations/html.lua +++ b/lua/lspconfig/server_configurations/html.lua @@ -3,7 +3,7 @@ local util = require 'lspconfig.util' return { default_config = { cmd = { 'vscode-html-language-server', '--stdio' }, - filetypes = { 'html' }, + filetypes = { 'html', 'templ' }, root_dir = util.root_pattern('package.json', '.git'), single_file_support = true, settings = {}, diff --git a/lua/lspconfig/server_configurations/htmx.lua b/lua/lspconfig/server_configurations/htmx.lua index 4c8f8afe..26611b71 100644 --- a/lua/lspconfig/server_configurations/htmx.lua +++ b/lua/lspconfig/server_configurations/htmx.lua @@ -3,7 +3,7 @@ local util = require 'lspconfig.util' return { default_config = { cmd = { 'htmx-lsp' }, - filetypes = { 'html' }, + filetypes = { 'html', 'templ' }, single_file_support = true, root_dir = function(fname) return util.find_git_ancestor(fname) diff --git a/lua/lspconfig/server_configurations/tailwindcss.lua b/lua/lspconfig/server_configurations/tailwindcss.lua index b4f24698..88c95ba8 100644 --- a/lua/lspconfig/server_configurations/tailwindcss.lua +++ b/lua/lspconfig/server_configurations/tailwindcss.lua @@ -59,11 +59,13 @@ return { -- mixed 'vue', 'svelte', + 'templ', }, init_options = { userLanguages = { eelixir = 'html-eex', eruby = 'erb', + templ = 'html', }, }, settings = { -- cgit v1.2.3-70-g09d2