This Visual Studio Code extension provides syntax highlighting for the Forth programming language.
It also supports
- line comments with the "\" char, bound to the default VS Code line comment keys.
- block comments: Forth does not have a standard block comment mechanism. The extension experimentally implements the somewhat ugly 0 [IF] ... [THEN] workaround, bound to the default VS Code block comment toggle key.
- code completion (auto close) for the : ... ; pair
It does NOT provide identifier navigation, code snippets, folding, completion, templates, compiling or debug support.
-
After installing and activating the extension in VS Code, any file with one of the extensions .fs .4th .fth .frt .forth is recognized as Forth source file, and syntax highlighting kicks in.
-
You can make it work for more file extensions by adding them to your VS Code User Settings in the settings.json file, for example:
"files.associations": { "*.444": "forth", }
Report bugs and issues here.
The syntax highlighting file ./syntaxes/forth.tmLanguage.json of the initial release is an exact (jsonified) copy of Maximilian Irro's Forth for Atom package, which he released under an MIT license. Thank you for doing the hard part!
Initial release.