The thing is, the highlighting is done by a static JSON file, so it’s impossible to detect if the author if using the standard library or PunyInform and highlight accordingly. So if we add the PunyInform-specific functions, they’ll be highlighted for the standard library users too, which is not ideal.
Actually, I even hesitated to highlight the standard library functions since authors can write Inform 6 programs without a library! (And when the standard library is updated, I have to update the extension, too, which is a bit of a pain.) So I’m a bit wary of adding support to a specific library. After all, why not support other ones too, like Platypus or Triform, while we are at it? (Admitedly, they might not be as widely used.)
I can see 2 solutions for what you’re asking:
- Create a separate extension that injects some grammar in the Inform 6 syntax file (see in the VS Code documentation). The drawback is that you have to enable or disable this extension in your workspace depending on your project (if it’s using Puny or not). Or maybe it should be possible to be able to select if you want to use Puny highlighting on a per-file basis, in which case it could be included in the same extension.
- Programmatically detect what functions exists and highlight them accordingly. That what a language server like Language Server for Inform 6 (+clients for eclipse and vscode) can do. (But that’s not what you are asking, since you only want to hightlight the functions from the library.)
I’ll have to think about it. (And maybe others can give their insights too!) In the meantime, you could write a bug report in the extension repository, listing the PunyInform-specific functions/attributes/etc. so that I can try things when I have time.
And thanks for the nice words, it really appreciated!