windwp / nvim-ts-autotag

Use treesitter to auto close and auto rename html tag
MIT License
1.54k stars 85 forks source link

Templ tag completion #154

Closed AnthonyPoschen closed 5 months ago

AnthonyPoschen commented 6 months ago

resolves #152

out of the main configuration

    start_tag_pattern = { "tag_start" },
    start_name_tag_pattern = { "element_identifier" },
    end_tag_pattern = { "tag_end" },
    end_name_tag_pattern = { "element_identifier" },
    close_tag_pattern = { "erroneous_end_tag" },
    close_name_tag_pattern = { "erroneous_end_tag_name" },
    element_tag = { "element" },
    skip_tag_pattern = { "quoted_attribute_value", "tag_end" },

i only encountered and correctly modified for my new type

start_tag_pattern
start_name_tag_pattern
end_tag_pattern
end_name_tag_pattern

The other variables i assumed from other elements, but i correctly now have in a simple templ file auto tag closing

https://github.com/windwp/nvim-ts-autotag/assets/2253299/c7d1b6d3-56a6-4da2-b1b7-8ee79164efd3