rolandshacks / vs64

C64 Development Environment for Visual Studio Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can we get an alternate .asm language for KickAssembler to use "//" as line comments?

lwestfall opened this issue · comments

I'm not an extension developer, nor a seasoned assembly programmer so there might be better options, but can we get a new language definition to specifically handle KickAssembler .asm files?

Really the only reason I ask is because the line comment configuration has ";" as the line comment symbol which is great for a lot of assemblers, but not KickAssembler.

From the manual section 3.10:

Traditional 65xx assembler line comments (;) are not supported since the semicolon is used in for-loops in the script language.

I guess what I'm proposing is a second set of assembly language files, where the only difference (other than naming) is to change this to "//"

"comments": {
"lineComment": ";"
},

Not an easy one as (to my knowledge) it's not possible to add some kind of "smart" detection of what flavor of assembly the file is. I'll try to better understand if there could be some workaround (other than using a different file extension and duplicate the grammar), but so far, I wasn't successful.

Thanks for the response. I'm not sure that detecting the flavor of assembly is necessarily what I'm asking for (though if it were possible, that would be neat). If I could override this at a workspace level using a file associations override, that would be good enough for me.

For example, I could add this to a settings.json:

    "files.associations": {
        "*.asm": "kick-asm"
    }

Again, this is a little beyond my realm of knowledge so hopefully this makes some sense.

Sorry for the delayed response. Good point and actually, a good idea. Whenever I find a bit of time, I'll fiddle a bit around on that idea.