BartmanAbyss / vscode-amiga-debug

One-stop Visual Studio Code Extension to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 12.2 with the bundled WinUAE/FS-UAE.
GNU General Public License v3.0
303 stars 38 forks source link

Support other Motorola assembly language providers #175

Closed grahambates closed 1 year ago

grahambates commented 1 year ago

There are other extesnsions that provide language definitions for Motorola 68000 assembly under the language name m68k. Notably my own Motorola 68000 Assembly and the one defined by the Amiga Assembly extension.

This change allows you to use these languages when present, and still be able to set breakpoints and see cycle counts. I've also added some configuration to set the vasm binary and include paths for Motorola 68000 Assembly.

I was also wondering what you thought about adding my one to the recommended extensions in the template project. It's the most complete in terms of editor features and language support.

BartmanAbyss commented 1 year ago
  1. I'm not sure I understand which extension is responsible when multiple are installed, since your extension also specifies .s, .asm extensions?
  2. Is there even any sense keeping all that assembly stuff in my extension? Yours seem to have much more features?
grahambates commented 1 year ago

If there are multiple languages associated with a single file extension, the user can select from the Language Mode menu in the toolbar:

image

They can configure the file type association to choose their prefered language as the default:

image

As for what the default 'Auto Detect' gives you, I can't find any documentation for the rules, but it appears to pick the first matching one in the list, which in this case is your one. This is probably a good thing because we'll still want amiga.assembly to take precendence for *.s files so they're parsed as standard ASM. We could also configure this file association in settings.json for the template project.

I agree that there's probably not much benefit keeping the amiga-assembly.mot language if you're happy to rely on my one. It makes sense to use external language extensions where they exist like you do for C/C++. I can update the PR with this approach.

BartmanAbyss commented 1 year ago

I agree that there's probably not much benefit keeping the amiga-assembly.mot language if you're happy to rely on my one. It makes sense to use external language extensions where they exist like you do for C/C++. I can update the PR with this approach.

Sounds good. Then you can add your extension as a recommendation.