mopemope/meghanada-emacs

Support Universal Code Formatter

Closed this issue · 4 comments

My team at work has many project repos and they all use the same code format. It'd be convenient to just put an eclipse formatter in say ~/.emacs.d/meghanada/meghanadaFormat.xml and have it apply as the default for all projects rather than the google java formatter.

deb75 commented

Hi,

This is what I do, just put your meghanadaFormatter.xml at the root directory of your project, where .meghanada.conf should also be located.

Then, within emacs issue Alt x meghanada-show-project, this will display all settings for your project and you can check that your XML file is indeed taken in account.

I don't think you quite understand. That's the current behavior as it is. Thing is that I have something like 30 different projects (some of which have subprojects which meghanada doesn't handle gracefully). Every time our formatter is updated, I have to remember to move the formatter into all of the individual projects.

Because the formatter is the same for all projects, I'd much rather be able to set the default formatter to my company's.

@tekktonic The next version supports global code formatter setting.

@tekktonic I've released the latest version that fixes this issue.
I hope you'll try it.