Closed DonyorM closed 5 years ago
This is on my radar, it's tough because VScode only allows you to register one formatting extension per language, so if I were to do that then you couldn't use PHPCBF or something like that.
I do like the idea of just a command for formatting though, would you be looking to do highlighted regions of text or the whole document? I'm assuming your looking to do specific blocks of text. On a side note what I do in this case is format the whole doc and then remove the chucks I don't want to commit with a GUI like Gitkraken. It's not the greatest solution.
Honestly both would be nice but I was more thinking of the whole document. Basically my issue is I'm working a team, and when I'm only editing php code, and not the surronding html, I don't want to add meaningless whitespace to the commit log, because not everyone is using this extension.
Added a keybinding and right click context menu options.
Would it be possible to have a workbench command to format the html specifically when requested without having to have format onBeforeSave enabled? I'm working in a team and I don't want to unnecessarily clutter commit logs if I didn't really edit the html of a file that someone else wrote, so I want to be able to run this extension only on command.
Thanks for writing this, it looks great.