sourcepawn-vscode
sourcepawn-vscode copied to clipboard
Auto formatting adds spaces between words and symbols on #tryinclude lines
Basic informations
- OS: [Windows] 11
- VSCode version: Latest
- Extension version: Latest
Further Information
#tryinclude
lines have extra spaces inserted between words and symbols, causing them to break
To Reproduce
- Auto format
Expected behaviour
#undef REQUIRE_PLUGIN
#tryinclude <Source-Chat-Relay> // Discord relay
#undef REQUIRE_EXTENSIONS
#tryinclude <SteamWorks> // Used to set the game description
#tryinclude <tf2_stocks> // TF2 Tools extension natives
#tryinclude <tf2items> // Replacement weapons
Error messages
#undef REQUIRE_PLUGIN
#tryinclude < Source - Chat - Relay> // Discord relay
#undef REQUIRE_EXTENSIONS
#tryinclude < SteamWorks> // Used to set the game description
#tryinclude < tf2_stocks> // TF2 Tools extension natives
#tryinclude < tf2items> // Replacement weapons
I will fix this eventually, but note that the extension just calls clang-format under the hood for formatting. All the configs for clang format are available online.
As a workaround, you can do: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#disabling-formatting-on-a-piece-of-code
Thank you kindly.