Skip to content

Commit cb0a112

Browse files
committed
Add HEEx support
1 parent e239a56 commit cb0a112

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lua/nvim-ts-autotag/config/plugin.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ local function setup_tag_configs()
4343
end_tag_pattern = { "ETag" },
4444
}))
4545

46+
-- Support Elixir HEEX files.
47+
-- HEEX is simply HTML with the addition of the <.component></.component> syntax.
48+
TagConfigs:add(html_tag_cfg:extend("heex", {
49+
start_tag_pattern = { "start_component" },
50+
start_name_tag_pattern = { "component_name" },
51+
end_tag_pattern = { "end_component" },
52+
end_name_tag_pattern = { "component_name" },
53+
skip_tag_pattern = { "end_component" },
54+
}))
55+
4656
TagConfigs:add(base_cfg:extend("typescriptreact", {
4757
start_tag_pattern = { "jsx_opening_element", "start_tag" },
4858
start_name_tag_pattern = {
@@ -135,10 +145,10 @@ local Setup = {
135145
["htmlangular"] = "html",
136146
["htmldjango"] = "html",
137147
["markdown"] = "html",
138-
["elixir"] = "html",
139148
["php"] = "html",
140149
["twig"] = "html",
141150
["blade"] = "html",
151+
["elixir"] = "heex",
142152
["javascriptreact"] = "typescriptreact",
143153
["javascript.jsx"] = "typescriptreact",
144154
["typescript.tsx"] = "typescriptreact",

0 commit comments

Comments
 (0)