nvim-ts-autotag icon indicating copy to clipboard operation
nvim-ts-autotag copied to clipboard

How to get html tag closures within templ files?

Open AnthonyPoschen opened this issue 1 year ago • 0 comments

Templ is a templating language for use within golang. Example file hello.templ

package main

templ hello(name string) {
	<div class="">Hello, { name }</div>
}

templ foo(name string) {
	<div class="">
		@hello(name)
	</div>
}

I would like to be able to get the html tags autocompleted when they appear. i have tried the below "minified" lazy config

	{
		"windwp/nvim-ts-autotag",
		opts = {
			filetypes = {
				"templ",
			},
		},
	},

I suspected the templ format needs to become part of the internal file's html filetypes, maybe would be good if those tables could be exposed to allow easy extension.

AnthonyPoschen avatar Jan 02 '24 13:01 AnthonyPoschen