Reformat Code does not follow the Code Style settings for indent methods after access modifier
已完成
I have set my Code Style for Ruby as follows:
But when I reformat code (Ctrl+Alt+L) it resets indentations after access modifier. It does not follow my Code Style settings.
Before reformat:
class Example
def public1
end
private
def private1
end
end
After reformat:
class Example
def public1
end
private
def private1
end
end
How can I keep the indentation?
请先登录再写评论。
Hello,
could you please specify your RubyMine version? I've checked it in 2019.3 EAP but didn't manage to reproduce.
Hello Olga,
Thanks for the comment.
I was using 2019.1.4 from stable releases. I updated it to 2019.3 EAP, but it is still happening.
RubyMine 2019.3 EAP
Build #RM-193.4386.6, built on October 8, 2019
Do you have any 3rd party plugins installed? If so then could you please try disabling them.
Thank you! Disabling the plugins solved the issue.
It started working correctly when I disabled all the third-party plugins, and now it's working even after enabling them back.
Upgraded to IntelliJ 2020.3 today and experienced same exact issue. I disabled a plugin which I had installed from a Zip file which incidentally stopped working after upgrading to IntelliJ 2020.3 (not sure if this had anything to do with this), tried reformatting and it followed my code style indentation settings, enabled plugin back up (even though it's still broken after upgrade), tried formatting again and it worked as expected. I shared this tidbit with my teammates at work in case they experience similar issue. So far I think I'm the first developer to have upgraded other than our manager.