Fork me on GitHub
#emacs
<
2017-05-03
>
sound2gd00:05:59

anybody use emacs to write java code?

tanzoniteblack16:05:00

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

https://github.com/mopemope/meghanada-emacs is what I was using. I’d also spent sometime using http://ensime.org/ which was built for scala, but recently started supporting java as well

tanzoniteblack16:05:46

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

tanzoniteblack16:05:59

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

richiardiandrea00:05:24

@sound2gd I have tried to, gave up

sound2gd00:05:55

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

jfntn02:05:16

Been using https://github.com/candid82/flycheck-joker 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

qqq03:05:48

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

jfntn03:05:46

in go 😛

qqq04:05:12

isn't parsing reader macros quite messy ?

qqq04:05:20

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

bozhidar04:05:18

@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

bozhidar04:05:32

@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.

benedek06:05:43

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

benedek06:05:35

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

bozhidar06:05:48

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

bozhidar06:05:14

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

benedek07:05:17

because it is written in go, @bozhidar ?

benedek07:05:46

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

benedek07:05:11

i have not tried to play with it tho tbh

benedek07:05:22

pretty high on my todo list tho

jfntn14:05:11

@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.

jfntn14:05:46

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

richiardiandrea15:05:01

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

jfntn16:05:06

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

richiardiandrea16:05:17

We should 😀😀

codeasone20:05:29

I find https://github.com/brunchboy/kibit-helper useful, M-x kibit-accept-proposed-change works okay

codeasone20:05:32

@sound2gd I was doing some Java today and started using https://github.com/mopemope/meghanada-emacs. 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...

codeasone20:05:06

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