Open Kiiyya opened 3 years ago
An alternative viewpoint: please do not change the current behavior of the extension (or, if you do make this change, please allow the user to disable it and use the old behavior).
Here's why:
In VSCode, templating languages that aren't built-in to the editor do not have all the intellisense and auto-formatting features present in the HTML language type. This is a longstanding issue with the editor, and does not seem to be a high priority for the team to fix. See: https://github.com/microsoft/vscode/issues/41066, https://github.com/microsoft/vscode/issues/53462
Although Emmet can be enabled for alternative templating languages, hover documentation and automatic formatting (for example, pressing "enter" between two tags to get an added newline and proper indentation) do not work. Try this out in any other templating extension with its own filetype to see what I mean (Better Jinja, ERB, etc).
The choice to extend the HTML language instead of creating a new language type is shared with a popular Hugo extension, and I think it's the correct decision. If you want to use HTML-style comments (for example, while working on plain HTML files), you could just disable the Tera extension temporarily.
If I have to choose between using HTML-style comments and using intellisense and automatic indentation, I would much rather choose the latter!
A bit related to issue #15.
What I did: I am editing a normal HTML file, which is not a template. I press
CTRL-/
to create a comment. As a result, I get a Tera comment, not a HTML comment. This is bad. I look at the langauge in VSCode, and it is "HTML".My problems:
Solutions I recommend:
foo.html.tera
or something like that.Would be cool, thanks for making this extension :).