Fork me on GitHub

anybody use emacs to write java code?


sound2gd: I don’t often write java code anymore at my new job. But at my old job, I’d write java in emacs.

tanzoniteblack16:05:07 is what I was using. I’d also spent sometime using which was built for scala, but recently started supporting java as well


both have their annoyances, but both worked well enough for the actual writing of java in terms of autocomplete, jump to source, error catching, syntax highlighting, etc. The bigger annoyances I had were that projectile’s run tests/compile weren’t out of the box great for multi-module maven projects, because it would try to do everything at the parent (you can hack around this though) and that in the team I was working with everyone else used intellij, and had no idea how to actually set up anything outside of that environment. Which generally just meant that running the junit tests was obnoxious


Looks like meghanada has added support for junit test running though, which it didn’t use to have


@sound2gd I have tried to, gave up


I wonder if someone has some tricks in doing this:grin:


Been using for a while and highly recommend it. It has a few quirks with clojure 1.9, but it’s fast, solid, works well with cljc, finds unused locals, unused requires, wrong arities and more. It is both amazing and bewildering that a go program is the best clojure linter I’ve used


@jfntn : it's written in go ? how does it parse clojure ?


in go 😛


isn't parsing reader macros quite messy ?


I looked into writing a parser once, and just gave up


@qqq the naming’s a bit confusing - there wasn’t part 1, I just had 2 talks at this conference because one of the speakers dropped out


@sound2gd The default experience is pretty horrible, but there were some interesting efforts like malabar-mode and jde over the years. Not sure where they are today. Guess no one was really invested in building a good mode for Java development for Emacs.


so @jfntn do you think joker could be used for cljr or even cider at some point?


referring back to our conversation on that cljr issue you created ofc


I doubt this is going to be feasible, after all there’s not easy way to leverage whatever API it exposes.


Probably it’s usage as a lint would be remain it’s only real-word application for the foreseeable future.


because it is written in go, @bozhidar ?


i mean that alone does not mean that there is no interface to talk to it from elisp and/or clojure


i have not tried to play with it tho tbh


pretty high on my todo list tho


@benedek I don’t think it makes a good target for integration in cider, for the same reasons that I don’t like tools.analyzer.jvm being a reimplementation of the clojure compiler. joker is an even more extreme case of that being that it’s written in go. On the other hand it works great as a simple linter, it’s a rare case of worse is better for me, most likely due to all the other analysis-based tools like clj-refactor and eastwood not supporting cljc.


Have an action plan for the cljs analyzer in clj-refactor by the way, just haven’t had time to execute uet


Awesome, a static code analyzer would put us back on track in the race against Cursive 😀😀


@richiardiandrea not sure what you’re referring to? afaik nobody’s working on that?


We should 😀😀


I find useful, M-x kibit-accept-proposed-change works okay


@sound2gd I was doing some Java today and started using It's a worthwhile addition to java-mode and everything you needs is setup automatically with MELPA (server-side jar is downloaded and run automatically). Failed to get jdb playing ball though...


seamless step debugging between Clojure and Java code would be nice - anyone doing this?