Search notes:

VS Code: Language support

A file is associated with a language mode which is identified by a language ID.
Files whose language are not recognized are given the language ID plaintext, or the setting that is configured with files.defaultLanguage.
The language mode for the current file can be changed with the shortcut ctrl-k m or entering Change Language Mode into the Command Palette.
This command brings up a list of currently installed languages.

Associating a file extension with a language ID

A file extension can be associated with a language ID in settings.json. The following maps the two extensions .wfs and .cls to Visual Basic (whose language ID is vb):
"files.associations" : {
    "*.wsf": "vb"   ,
    "*.cls": "vb"
},

Language ID of current file

The language id of the current file is displayed in right side of the Status Bar:

Definining new languages

A new language can be defined in an extension's package.json (manifiest) file:
"languages": [{
     "id": "hierlog",
     "extensions": [ ".hlg", ".hierlog" ],
     "aliases": [ "hlg", "hierlog" ]
}]

Links

Language Identifier

Index