This VS Code extension can be used to add syntax highlighting for M204 source code exported in .txt format for easier reading.
Primarily includes highlighting for comments, variables, strings, and keywords.
- VS Code installed
- M204 procedures saved in .txt format
- This extension is not yet published on the marketplace, so to start using the extension with Visual Studio Code: download this repo, copy it into your
<user home>/.vscode/extensions
folder and restart VS Code.- On a Mac, you may need to Command-shift-period to show hidden files to reveal your .vscode folder
- Clone this repo
- Confirm you have npm installed
- In a terminal from the parent folder, run
code M204-language-extension
to open the extension code folder in VS Code - In VS Code, open the Terminal and run
npm install
- Hit F5 to debug the extension
- It opens a new VS Code window, with [Extension Development Host] in the header. Use this window to open your M204 .txt files and you should see the syntax highlighting
To make changes to the highlighting rules, you can edit the grammar defined in syntaxes/m204.tmLanguage.json. After saving your changes, if you are debugging, click the restart arrow (or Ctrl-Shift-F5) to see them reflected in your Dev Host window.
Initial release of the language extension