intellij-gdscript
intellij-gdscript copied to clipboard
Propose code formatting implementation
I plan to get to work implementing GDscript code formatting functionality. There are a few features I would like to see come of this, but the two primary ones are; proper formatting as one types, and being able to hit the Reformat Code/Reformat File buttons and have the code be refactored.
I think that would be a great starting point. Of course there is much more that can be done, but for now, I think this will work well.
Open to suggestion, other feature requests of course.
@idobbins, FYI I implemented a new lexer that produces indentation tokens as promised. Branch is still WIP, but most of the tests are green. I will publish a new version soon (when it's ready), but if you want, you can familiarize with code. GDScript transition to Grammar Kit is also included: https://github.com/exigow/intellij-gdscript/pull/82
Not sure if this is exactly what you want, but I use https://pypi.org/project/gdtoolkit/ for formatting code.
You can install it, and configure it as an external tool in IntelliJ:
When you map it to a keybinding, it will reformat the file in a consistent manner.