Fork me on GitHub
#vim
<
2019-05-29
>
dominicm07:05:19

Why has ALE been more successful than Neomake? (At least to this casual observer)

dharrigan08:05:28

Sounds like beer 🙂

dharrigan08:05:40

I see in their "makers" list, that clojure (joker or clj-kondo) isn't there

dharrigan08:05:46

whereas on ale, it's automatically detected

dominicm08:05:57

That's about ecosystem/popularity I guess :) Someone is contributing that in the first place

dominicm08:05:32

Adding support for both via 'makeprg' is pretty easy: &l:makeprg='joker --lint %; clj-kondo --lint %'

dharrigan08:05:58

true true, but that's a barrier to entry, a hurdle that someone (at the moment) has to configure locally (and know how to do that!)

dharrigan08:05:39

so, having ALE (which is tasty sounding :-)) do that automagically, with no thought required is a win for adoption

dominicm08:05:17

For sure. My point is basically that adding support to any of them should be roughly as simple as that.

dharrigan08:05:14

Does Neomake work better than ALE?

dominicm08:05:58

It looks "less"

dominicm08:05:15

e.g. no "go to definition" which is a weird feature for a linter

Hukka10:05:41

Hmh. Is there a simple way to eval in fireplace without printing?

Hukka11:05:56

Or maybe I should just disable pretty printing temporarily

dharrigan11:05:46

I have this nmap <silent> <Leader>e :Eval<CR>

dharrigan11:05:59

(and this nmap <silent> <Leader>E :%Eval<CR>)

dominicm11:05:40

heh, hadn't considered using silent, neat :)

dominicm11:05:39

@tomi.hukkalainen_slac still curious why you'd need it

Olical13:05:39

If anyone has any feedback for my quick doc addition to Conjure or wants to try and break it, I'm all ears! https://github.com/Olical/conjure/pull/38 Basically showing a one line doc as Neovim virtual text when you CursorHold on a form. I lookup the symbol at the head of the form so it's not what's directly under your cursor. Definitely need to work some issues out but hopefully it's roughly what people would expect / want! (I'll also be giving eval the same treatment when the output is really small to avoid opening the log window in every case)

dharrigan17:05:02

Anyone using deoplete (and async-clj-omni) with clj? I'm having a hard time figuring out how to show completion with this setup. If I use lein repl it's all fine, but doing the same with clj won't show suggestions for autocompletion.

dominicm17:05:15

@dharrigan make sure you're loading cider-nrepl into your clj-started repl.

dharrigan18:05:19

thanks, my deps.edn looks like this:

dharrigan18:05:22

:nrepl {:extra-deps {nrepl {:mvn/version "RELEASE"}
                       cider/cider-nrepl {:mvn/version "RELEASE"}}
          :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}

dharrigan18:05:32

I'll have a look at the link you sent in a mo

dominicm19:05:37

That looks like it should work, although I've never tried that exact approach.

dharrigan19:05:41

I'll keep experimenting 🙂

dharrigan19:05:52

(I prefer to run my repl outside of vim)

dominicm19:05:00

vim-jack-in uses dispatch to start it outside of vim. I have it configured to create a new tab on my terminal.

dominicm19:05:59

@dharrigan fwiw, the nrepl started like that works for me

dharrigan19:05:24

do you get deoplete with completion of clojure core libs working?

dharrigan19:05:41

i.e., if I type in "it..." it suggests words like "iterate"?

dharrigan19:05:06

okay, I'll investigate, I'm doing something wrong, thanks for the verification! 🙂

dominicm19:05:37

what happens if you do echo fireplace#message({'op': 'cider-version'})

dharrigan19:05:31

let me redo that

dharrigan19:05:18

[{'status': ['done', 'unknown-op', 'error'], 'id': 'fireplace-generic-1559159694-8', 'session': '63c7e218
-e607-424c-b8b7-45607635a003', 'op': 'cider-version'}]

dharrigan19:05:38

the first one was me doing that whilst lein repl was running

dominicm19:05:55

looks like cider isn't present in that repl

dharrigan19:05:02

kk, investigating

dharrigan20:05:31

are you using your vim-jack-in plugin with the deps.edn I provided to get the suggestions?

dharrigan20:05:44

or have you disabled your plugin?

dharrigan20:05:15

interestingly, if I do this clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.21.1"} }}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" and launch vim it works

dharrigan20:05:43

if I do clojure -A:nrepl:rebel given my .clojure/deps.edn, it does not

dominicm20:05:39

that makes sense

dominicm20:05:49

you can only have one set of :main-opts active at a time, last one wins.

dominicm20:05:11

I'm not sure what nrepl you are connecting to, but it isn't the same one that your rebel is connected to.

dominicm20:05:32

In edge I solved this using JVM opts to decide what to run.

dharrigan20:05:02

kk, thank you for your help this evening. I'll sort it out 🙂

dharrigan20:05:10

(and for the insight for main-opts)

dominicm20:05:24

(let [prefix "edge.load_"]
  (doseq [[prop _]
          (filter
            (fn [[prop _]]
              (.startsWith prop prefix))
            (into {} (System/getProperties)))]
    (require (symbol (subs prop (count prefix))))))
I have this little devil in edge, then bin/rebel does this if you pass the --nrepl flag: -J-Dedge.load_nrepl=true which is the same as -A with :jvm-opts

dharrigan20:05:17

ta, I'll examine how edge is invoked and borrow things from there 🙂