Open dgazzoni opened 2 years ago
Hey - this relates to https://github.com/dan-c-underwood/vscode-arm/issues/19. Unfortunately, syntax grammars are pretty limited in their functionality - there's no way to swap between comment characters for example (which is fine for most languages! but there are so many variants of toolchains in the assembly space).
How are ;
handled in your setup? As that matches what the Arm Compiler reference expects and might be a reasonable compromise: https://developer.arm.com/documentation/dui0473/m/structure-of-assembly-language-modules/syntax-of-source-lines-in-assembly-language
If it doesn't work, I'm open to swapping over to //
but I'll have to look at what Arm projects generally use.
I just tried ;
and it didn't work here -- I recall reading that ;
is used by gas
somewhat like the C pre-processor uses \
.
However, #
does work.
Sorry for the delay in getting back on this. I did try some experimentation (including the package offering a multiple per-compiler versions of the language, however it doesn't function reliably! (VS Code was randomly, per-load, picking which comment style to use no matter which language was manually selected). I'll continue investigating this - but in the short term, this extension looks like it might meet customisation needs: https://github.com/ArturoDent/custom-language-properties
I'll update here if I work out a cleaner solution.
Also - there's this open issue on the VSCode repo - it may be useful expressing interest in this capability over there, as that would be the cleanest solution! 😄
I'd like to use the Edit -> Toggle Line Comment command (or, more specifically, its shortcut Cmd+/) to comment lines in my code. However, this prefixes the line with @, which is not treated as a comment in my setup (Linux, AArch64 assembly, .S files which go through preprocessing) and thus fails to assemble. Instead, a comment needs to start with //.
Would it be possible to create a setting to select the comment style to use, @ or //?