✨ JetBrains IDEs plugin?
Hey, I wanted to ask if you plan a plugin for syntax highlighting, etc. for JetBrains IDEs? similar to what's available for vscode?
To implement this, it would be beneficial if there was a formal description of the Amber language that goes beyond the regex available in the VSCode plugin. The reason is that a JetBrains plugin requires to re-implement the parser in Kotlin/Java. So if a BNF or a clear documentation about tokens, precedences, parsing rules, etc was available, a JetBrains plugin could provide not only syntax highlighting but
- complete syntax error analysis
- navigation from variables/functions to their definition and back
- inspections
- parameter help for user-defined functions
- quickdoc lookup (if there is something equivalent to Java documentation comments)
- type hints and type checks
- and much more
However, working on a plugin without help from the maintainers who provide up-to-date information about syntax is really painful and error-prone.
@halirutan funny to meet you in such an unusual place :)
If we're speaking about the basic support, it can be borrowed from basically any open source language plugin (is bash support open source?).
But surely having a formal grammar would help a lot to implement a proper support with https://github.com/JetBrains/Grammar-Kit
This is also required for the Zed IDE that I'm currently using. I think that once the language becomes more stable and mature, we can invest our time in formally documenting the parsing rules in the official documentation. However, to avoid leaving you empty-handed, I'll prepare some basic BNF that we can expand on as we move forward.
I've added EBNF language grammar in this issue https://github.com/Ph0enixKM/Amber/issues/100 (merged already - we can iterate on this). If you find any errors, please create an issue on it so I can clarify any confusion
For syntax highlighting to work in Zed (and also in other text editors like Neovim/Emacs/Helix), a tree-sitter parser for Amber should be implemented.
Ref: https://tree-sitter.github.io/tree-sitter/creating-parsers