Dear IF community! I’ve decided to go open source with my homegrown project that’s been occupying me for some months now. It is a Language Server implementation for Inform 6. It is right now in a really early alpha stage but I’ve come to the conclusion that it might already be useful in its current state for anyone working with Inform 6.
The project is written in the XText framework and is mainly served for eclipse. GitHub - toerob/ls4inform6: Language server implementation for the Inform 6 language. But I’ve also written a bare basic client implementation for visual studio code, found at:
GitHub - toerob/inf6langtools: LSP vscode client for the inform6 language.
Installation instructions for both are found in the readme file.
The really nice thing with a Language Server is that it will only require a thin client (or sometimes none at all) to be fully working in any Editor supporting the Language Server Protocol. (The ones providing this can be found here: Tools supporting the LSP)
I’m interested in hearing what features you might suggest and if there are any collaborators wanting to join in. Writing grammar is very time consuming and at the present stage the plugin is more of an outliner with some pretty nice bonus effects, such as “go to references” on direction properties and class names. (In eclipse it is also possible to navigate via include statements to other files). Plus that it checks the overall syntax of your written code.
Bear in mind though that the parser is a of a “fuzzy” kind, that means it in this case that it won’t parse (to any great extend at least) expressions written inside global or local routines. And therefore only performs analysis on broader code structure. A full parser is something I wish to incorporate further ahead. It won’t happen anytime soon though. Also bear in mind that there are some trickiness involving preprocessed directives. It will have a problem parsing conditional properties inside objects as it will for now simply ignore such rows completely. Those are mostly found in the library files and usually not the game file itself.
Please let me know what you think!