Open lmajano opened 6 years ago
This would involve implementing a DocumentFormattingEditProvider. I'm not sure how the Sublime plugin does this, but it seems to me that you would need a parser to do this properly. Sublime at least has access to the syntax scopes from the grammar, which might be how it's doing it, but the VS Code API does not provide access to that information.
EDIT: Found where it's done. It looks like there are many references to the scopes as I expected.
I would like to piggyback on this old enhancement request. It would be great to be able to format .cfc and .cfm files. For the .cfm files, I think using a standard HTML format would work great for most people. For CFC files, maybe there's a way to leverage cfformat
I know that Scott steinbeck has created a module to put CommandBox in deamon mode inside of VSCode. This would allow the cfformating to work fast due to this. Maybe Bradd Wood can assist in connecting you guys.
What would it take to have some code formatting commands like the sublime plugin: