DonaldHays / rgbds-vscode

Visual Studio Code language extension for RGBDS GBZ80 Assembly
MIT License
65 stars 9 forks source link

Not working for .asm file extension #7

Closed mreale closed 5 years ago

mreale commented 5 years ago

I instaled the last version on VSCode and the extension stops being activated for .asm source files after I close/reopen the source folder. It works consistently with .sm83 extension, though.

Any ideas?

DonaldHays commented 5 years ago

@mreale just tried poking around a bit with ASM files and opening and closing and it seems to still work.

Is it possible you've added another extension that associates with ASM files?

If not, could you try offering me a specific set of steps you can follow to consistently get this behavior that I can try to reproduce the issue?

mreale commented 5 years ago

@DonaldHays, thank you for your reply. I use a few plugins like Microsoft Intellicode, Microsoft C/C++ Intellisense and PlatformIO. The steps I followed to reproduce the problem:

1) Close all folders 2) Install the RGBDS Z80 extension (version 2.4.1) 3) Open my folder with z80 .asm source files. It works like a charm but.... 4) After closing and reopening the aforementioned folder the extension stops to activate the syntax highlight - but it works great if I rename it to .sm83

I think you are right about another plugin possibly using the .asm extension.

EDIT: I will selectively disable all extensions to see if the problem is solved.

Best regards

DonaldHays commented 5 years ago

@mreale Looks like PlatformIO provides something for asm files.

You can configure your settings (either your global vscode settings.json or .vscode/settings.json in your project folder) to select one provider for specific file extensions using the files.associations key, like so:

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

Alternatively, I think you should be able to make this configuration using the UI. Open an ASM file, and on the bottom status bar in the lower right between the line ending mode and the "provide feedback" smiley emoji there's an indication of the language mode it's in. Click it and you'll get a prompt that will let you configure file associations.

Does messing around with that sort of configuration solve the problem?

mreale commented 5 years ago

It's done!

Thanks for your valuable help @DonaldHays, very appreciated. I think I will enjoy using the RGBDS Z80 in my retro computing projects, it's a great tool.

Issue closed.

DonaldHays commented 5 years ago

Awesome! Glad to hear it!