Skip to content

Commit

Permalink
Add HEEx support
Browse files Browse the repository at this point in the history
  • Loading branch information
flmng0 authored and PriceHiller committed Nov 30, 2024
1 parent e239a56 commit f2d24ac
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lua/nvim-ts-autotag/config/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ local function setup_tag_configs()
end_tag_pattern = { "ETag" },
}))

-- Support Elixir HEEX files.
-- HEEX is simply HTML with the addition of the <.component></.component> syntax.
TagConfigs:add(html_tag_cfg:extend("heex", {
start_tag_pattern = { "start_component" },
start_name_tag_pattern = { "component_name" },
end_tag_pattern = { "end_component" },
end_name_tag_pattern = { "component_name" },
skip_tag_pattern = { "end_component" },
}))

TagConfigs:add(base_cfg:extend("typescriptreact", {
start_tag_pattern = { "jsx_opening_element", "start_tag" },
start_name_tag_pattern = {
Expand Down Expand Up @@ -135,10 +145,10 @@ local Setup = {
["htmlangular"] = "html",
["htmldjango"] = "html",
["markdown"] = "html",
["elixir"] = "html",
["php"] = "html",
["twig"] = "html",
["blade"] = "html",
["elixir"] = "heex",
["javascriptreact"] = "typescriptreact",
["javascript.jsx"] = "typescriptreact",
["typescript.tsx"] = "typescriptreact",
Expand Down

0 comments on commit f2d24ac

Please sign in to comment.