Open winitzki opened 1 month ago
Hi! Sadly this plugin is not currently maintained, but I'm open to it if I have time in the future. Glad to hear you've made a Scala parser for Dhall.
This is the reference that should be used for IntelliJ plugin development for a custom language: https://plugins.jetbrains.com/docs/intellij/custom-language-support.html. I haven't done any of what I mention here before, so definitely follow the documentation if it contradicts what I say.
The first and least documented step is correctly mapping the fastparse
AST into the IntelliJ AST format using PSIBuilder
. There is a diagram for this here: https://plugins.jetbrains.com/docs/intellij/implementing-parser-and-psi.html#parser-implementation. However, IntelliJ's documentation is focused mostly on doing this with their GrammarKit utility - perhaps searching for other plugin implementations that use PSIBuilder
directly could be useful.
Once a compatible IntelliJ AST is produced, how to implement most of the other features should be covered in the plugin documentation. Let me know if I can help, but I may sometimes take a while to respond.
Hi! Thank you for your response. Let me just ask some quick questions.
This Dhall plugin seems to be unmaintained. I am interested in developing this plugin further. I would like to make it a full-featured plugin that enables productive working with Dhall source files.
I have recently implemented a Dhall binding in Scala - https://github.com/winitzki/scall That code uses
fastparse
for parsing and fully implements the most recent Dhall standard (all tests pass). So, I am quite familiar with both Dhall, its design and implementation, and with Scala / SBT. However, I am not at all familiar with IntelliJ plugin development / platform.Where would I begin if I waned to make changes to the Dhall plugin so that the parsing is more up to date with the current revision of Dhall? How do I implement "go to definition", "show usages" and so on? I'd appreciate any help and pointers to documentation or sample code.