Published Gosu Plugin Source Code...
We have finally published the Gosu IJ plugin we are working on here:
https://github.com/gosu-lang/Gosu-IntelliJ-Plugin
So now our crappy plugin can be *everybodys* problem... :)
First question where I can actually point to code. I'm trying to write a formatter at
https://github.com/gosu-lang/Gosu-IntelliJ-Plugin/blob/master/src/gw/plugin/ij/formatting/GosuIndentProcessor.java
using the Groovy plugin as a template. This works reasonably well for formatting, but it doesn't place the caret in the correct position when you hit return. It ends up having the same offset as the parent block.
I've debugged it but I can't figure out where I can tell IJ to indent the whitespace as a continuation of the previous lines whitespace.
Please sign in to leave a comment.
Hi Carson,
You're probably better off discussing this in the OpenAPI and Plugin dev forum at: http://devnet.jetbrains.net/community/idea/open_api_and_plugin_development.
The method that you want is Block.getChildAttributes(). You calculate the attributes in a similar way to your normal formatting calculation, and that controls where IJ indents to when you hit return.
Perfect, thanks!
Is there a way to move this thread? If not, I'll delete it and repost.
Umm, that I don't know, sorry.