Fork me on GitHub
#emacs
<
2018-12-11
>
practicalli-john09:12:18

@macrobartfast I use a layout for each project I work with, so simply switch to the right layout and search project. Not quite what you asked for, but may be of interest.

macrobartfast15:12:04

@jr0cket I'll look at that... thanks!

vemv21:12:03

TIL https://github.com/emacs-lsp/lsp-java exists, looks powerful. In previous occasions whenever I had to do some serious Java I abstained from Emacs also I was thinking, one could hack it to provide accurate completions in clojure buffers. e.g. for (.| some-object),

vemv21:12:09

| being the cursor one could build 'fake' java code on the fly, figure out the completions for that, and offer them for clojure

futuro22:12:12

Java completion with cider worked for me once I included the source tarball from maven, but not before.

vemv22:12:04

IIRC there's the annoyance that for each .jar dependency, a "source variant" (not the exact term) has to be specified, which neither Lein or Cider automate (I don't think using LSP would fix this to be clear)

vemv22:12:13

In any case I don't think CIDER does type inference, so completions aren't so accurate for Java interop that spans more than one symbol. That's what I had in mind some clojure+lsp+emacs hack

futuro23:12:13

Yeah, that's been my experience with cider, which was sort of a non-starter. Eclipse handles it just fine, though I'm not sure how exactly it does that.

👍 4
futuro23:12:17

That's good to know about CIDER and type inference, I didn't know that was a goal of the java LSP implementation.

vemv23:12:59

I explained myself badly 🙂 with inference I meant, given (-> some-obj .|)

vemv23:12:26

how do you know the type of some-obj for completions?

futuro23:12:09

I haven’t the foggiest, but that sounds like a really lovely feature.

futuro22:12:52

And when I was doing Android development, I used the Eclipse completion server to get completion for Java code, though I can't remember the setup off the top of my head (and this was in ~2012)

futuro22:12:37

Which isn't really making any comments on a java LSP server for emacs; that sounds really cool.

👍 4