Replies: 1 comment
-
Hi @metaleap - sorry about not getting back to you on this one, had too many things to respond to and do and lost this.
I think that can give you something similar to what you want - although, it does involve running a command in the terminal - it's not built into the LSP feature. The LSP that powers the VS Code extension already regenerates templ files in memory to provide the existing diagnostics, but doesn't write them to disk. I suppose the LSP could be updated so that it writes out to disk if/when the parsed templ file is valid. However, I do worry about clashes between programs that are updating that templ file, e.g. how it would interact with the I don't want to throw out the idea, because it sounds very useful to generate the files automatically on change from within the editor plugin, and not have to run something separate. I suppose the |
Beta Was this translation helpful? Give feedback.
-
Would you be open to this functionality idea and a PR for that? Asking before I waste time...
Way I see that, with that new config-setting contribution set to
true
, on any Save or SaveAll action involving.templ
files, the changed files would be regenerated. As for diagnostics, I'm not sure...And of course, if this idea got you all eager to hack this in yourself, lemme know and I'll let ya! 😁
Beta Was this translation helpful? Give feedback.
All reactions