astyle-extension
astyle-extension copied to clipboard
Support VS 2022
Visual studio 2022 is out soon. Please rebuild for this version
It is out now. Can we get support for vs2022? please please please please?
I switch directly in VS2022 to code style tools-> options -> text editor -> "language" -> code style and you can set "Format on save"
maybe you guys can try my fork: https://github.com/nneesshh/astyle-extension, fo vs2022 only.
@nneesshh, thank you very much!
It works when "Format on save" is checked. However, I would prefer to use keyboard mappings like before. Do you know how to make this work?
When I look in an old VS2017 setup, I see there were two options available in Options->Environment->Keyboard: Edit.FormatDocumentAStyle Edit.FormatSelectionAStyle
But these were not added in VS2022.
It also used to be possible to select these options in the menu.
Any ideas how to get them back? Or would it be possible to add them manually somehow? External tools can be added from the menu "Tools->External Tools" but I don't know how to configure it for AStyle.
There are some issues when using "Format on save". For example, when a file with unsaved changes is closed, Visual Studio pops up a "Save changes" message. If you select "Don't Save", it will still trigger AStyle format and then the file is not restored to its previous state.
https://github.com/nneesshh/astyle-extension/commit/bfad5e3113d3c24ca6026dbf7595898f867c8be4
@Amaroker You can try again. I don't know vsct well,I just search the text from your pic and fixed the vsct and guid, haha...
@nneesshh Perfect, it works! Thank you once again!