Fork me on GitHub
#vim
<
2020-06-07
>
geraldodev14:06:36

@olical what is necessary to autocomplete to work ? I invoke nreply behind reply, it connects to clojure through .nrepl-port but autocomple is not automatically happening. I have ale installed, I've issued :CocInstall prettier

Olical14:06:48

In ClojureScript + shadow-cljs? Or Clojure on the JVM?

Olical14:06:54

Oh! So can you get completions with <c-x><c-o>?

Olical14:06:06

And do you have the CIDER middleware installed?

Olical14:06:48

https://github.com/Olical/conjure/wiki/Quick-start:-Clojure this shows how to add CIDER middleware to your nREPL. I'll hopefully be able to provide simpler completions without it in future versions of nREPL πŸ™‚

Olical14:06:37

Then if you want autocompletion you either need CoC + https://github.com/jlesquembre/coc-conjure or deoplete which works automatically.

geraldodev14:06:19

I think i have cider because fireplace depends on it, but I might be wrong. I'm bringing reply.main as repl

geraldodev14:06:50

One curiosity if you may. Why vim-iced depends on vim-sexp and conjure does not ? Do you know ? I'm using paredit since ages. Do you use either of those ?

Olical14:06:38

I use vim-sexp, I reaaaaaly like it

Olical14:06:50

I didn't want Conjure to be tied to a paren manipulation tool in any way

Olical14:06:55

So I wrote a bunch of code to find forms for you

Olical14:06:09

Which I will be able to improve and shrink when tree-sitter lands in Neovim's stable releases.

Olical14:06:40

I would imagine iced is relying on sexp's text objects to select forms which is perfectly understandable. Extracting forms from a buffer is a nightmare πŸ˜„

Olical14:06:16

But yeah, if you can't get completions with <c-x><c-o> (built in omnicompletion) you probably don't have the cider middleware installed.

Olical14:06:41

I don't inject it automatically right now because I'm trying to be as careful as possible with your process. You might not want CIDER for some reason.

Olical14:06:01

(also not sure how I'd auto inject it properly, I think it requires a future version of nREPL)

geraldodev14:06:48

Thank you for the valuable information.

Olical14:06:24

You're welcome! If you definitely have CIDER set up though and completion still isn't working do let me know.

Olical14:06:34

I'm very confident it'll work fine once you have the middleware installed.

geraldodev15:06:56

@olical I was missing cider. Now Ctrl x o is opening completion. Is there a way to make it automatic ?

Olical15:06:51

Yay! You need either coc + coc-conjure, Deoplete or asyncomplete and the conjure plugin for thatt

Olical15:06:11

It's in the help text under autocomplete ☺️

geraldodev15:06:15

Yay , I said when I saw that conjure is written in lisp like language that generates lua.

Olical15:06:48

Yep :D I write all of my plugins in lisp that I compile to Lua now

geraldodev15:06:48

And the ConjureSchool script. So nice

Olical15:06:05

πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰β˜ΊοΈ

geraldodev20:06:46

I've disabled coc suggestion in the past to avoid conflicting with fireplace and forgot about that

geraldodev20:06:50

Is it possible to open the buffer certain way when opening clojure files ?

Olical22:06:16

Do you mean the log buffer?

geraldodev23:06:50

I've noticed that I like the bottom one and it would be nice it to be opened by default. I have some default actions to clojure file type I'm wondering if I could show the buffer there.

Olical08:06:40

hmm, I suppose you could use an autocmd on filetype of Clojure to press ,ls?

Olical08:06:46

It's not perfect, but it's a start

Olical08:06:04

The HUD won't appear if the bottom of the log buffer is visible.