Can I integrate rufo with Rubymine?
已回答
Hi there,
we use rufo on our project as a pre-commit hook. Wondering if there's a way to use it to autoformat on save inside of rubymine?
请先登录再写评论。
Hello,
in RubyMine you can invoke reformat before commit but according to project's code style settings (https://www.jetbrains.com/help/ruby/commit-changes-dialog.html#before_commit) As for rufo, we don't have any special support but you're welcome to submit a feature request on our tracker (https://youtrack.jetbrains.com/issues/RUBY) specifying how you'd like to see it implemented.
My solution to get rufo running in intellij/rubymine is to use the File Watcher Plugin and add a filewatcher which executes rufo after every save of a ruby file.
It is required to install rufo that it is executable on your workstation.
Here you find a manual to set up file watcher:
https://www.jetbrains.com/help/ruby/using-file-watchers.html
This is my set up that works fine for me: