georgjz / motorola-68k-assembly

A Language Extension for VS Code that adds syntax highlighting for the Motorola 68k and its variants. Supports multiple assemblers.
MIT License
10 stars 0 forks source link

Choose the default language variant #28

Open zerkman opened 1 year ago

zerkman commented 1 year ago

Hi, Everytime I open a source file it is identified as "Coldfire 68k Assembly (codewarrior)". I can switch it to my preferred variant "68k Assembly (vasmm68k_mot)", but I have to do that to every file I open. Is it possible to add a setting for choosing the default variant, or set the latest selected variant as the default ? thanks for this great extension bye, François

georgjz commented 1 year ago

Hi, sorry for my late reply, busy holidays.

There's two ways to "choose" a standard language for a given file extension: Either you edit your global settings.json file, or you create a local workspace settings file .vscode/settings.json (so it is only valid in that workspace/folder) and add:

 "files.associations": {
        "*.asm": "vasmmot"
    }

Let me know if this fixes your problem; I don't think this can be done in the extension code, but I'll have a look if necessary.

EDIT: See vscode documentation for context