So I just finished writing VS Code extensions for Inform 6 and 7. They only add syntax highlighting for the moment. Here are some features.
Inform 6
https://marketplace.visualstudio.com/items?itemName=natrium729.inform-6
- Highlights
.inf
and.h
files (comments, numbers, routines, keywords and directives, object declarations, strings). - Highlight characters, dictionary words and strings in different colours to help the author not mixing them up. Special characters in strings (
^
,~
,@:e
and so on) are highlighted, too. - Highlights Inform 6 template files (
.i6t
, used by I7) correctly, with the paragraph headings and all. - Highlights Javascript in strings used as arguments in Vorple’s
VorpleExecuteJavaScriptCommand
andBuildCommand
.
There are no snippets yet, but I plan to add them eventually. A language server for linting, auto-completion and so on would be very cool (I’m quite interested to tackle the challenge), but it won’t be anytime soon.
Inform 7
(I’ve made a specific topic for the extension. Updates for the I7 extension will be announced there!)
https://marketplace.visualstudio.com/items?itemName=natrium729.inform-7
I’m aware another extension already exists, but it made choices I didn’t like (for example, highlighting words such as “is” in sentences), and mine has more features. (And it seems the repo of the other extension isn’t public?)
- Highlights
.ni
and.i7x
files (story title, headings, comments, text and text substitutions, table names, documentation). - Highlight Vorple JavaScript commands, similarly to the I6 extension.
- Highlights Inform 6 inclusions if the above extension is installed.
- Highlights Preform files and inclusions.
A language server seems difficult to write because of the natural language. I may add snippets for the Standard Rules phrases.
I hope they will help people other than myself! And of course, comments, bug reports and other contributions are welcome!