-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for template prefix #3767
Comments
The Go Template extension for VS Code can perform Go template highlighting within a different syntax already, although some tweaking may be required. chezmoi.vim does the same nested syntax highlighting for Chezmoi tmpl files (note that it has strict loading requirements so it cannot be installed like any other Vim extension). chezmoi.el might be able to help here, too. This is an interesting idea which is worth examining deeper. The template extension is already an attribute modifiable with |
I use helix 🙂 But now that you mention that other editors have support, I thought about how that support could be added to helix (it has no plugin system).
This addition to I think my proposal could still be of value to other people. |
Adding a The correct thing to do, as has been described, is to configure your editor to highlight template files to your preferences. I'll add a FAQ entry at some point. In the meantime, I'll close this as "not planned". |
Is your feature request related to a problem? Please describe.
Adding the
.tmpl
suffix to any file usually breaks editor support for that file.This is not necessary in my experience, most templating syntax can be stuffed into string literals and comments of languages like bash and toml.
I would like to enjoy a normal editor experience when editing templates in my chezmoi repo.
Describe the solution you'd like
Alongside the
.tmpl
suffix, it could be possible to add atmpl_
prefix to a file name.Editors would then recognize the correct file type.
Describe alternatives you've considered
None come to mind.
The text was updated successfully, but these errors were encountered: