How to setup languagetool in Emacs

I got it working with the following commit.
However it feels a bit hacky and redundant to specify all those paths like that.