This extension adds support for the Modelica and Optimica languages to Visual Studio Code.
Source
Both grammar and snippets are imported from this implementation in SublimeText.
Features
Colorization
Snippets
Usage
Install the extension in VS Code
Open the command palette using Ctrl+Shift+P.
Type ext install Modelica in the command palette.
Select Modelica as a language
On the bottom-right corner, click on the select language mode button, if you have created a new file it should display Plain Text.
Select Modelica or Optimica in the list of languages.
Alternatively, saving the file with a .mo or .mos extension will allow VS Code to understand that it is a Modelica file and automatically select the language correctly. The .mop extension will be associated with the Optimica language respectively.
Additional extensions can be connected to the languages in any settings.json file using the "files.associations" setting.
Using snippets
Just start to type and choose a snippet that may be proposed. Alternatively, use Ctrl+Shift+P to open the command palette and type Insert Snippet to see a list of all possible snippets to choose from.