Fork me on GitHub
#conjure
<
2022-10-11
>
stopa16:10:50

Getting back into clojure and onto conjure! One noob question — unrelated to conjure but thought folks here would know; I guess most of us use clojure-lsp + coc? Main question: is there a “quick fix” window that I could make nvim pop up, based on clojure lsp? i.e I know clojure-lsp has an “import missing library” function. This gets suggested by calva for example. What’s the way to do this in nvim?

dharrigan17:10:33

If I type ,c for example (as , is my leader), a menu will popup

dharrigan17:10:59

i.e., nmap <silent> <Leader>c <Plug>(coc-codeaction-cursor)

stopa17:10:33

Beautiful, thanks @dharrigan!

dharrigan18:10:11

You're most welcome! 🙂

stopa19:10:13

@dharrigan Interesting -- coming close. I set up an example where in calva I get the correct “quickfix” suggestion. But in nvim if I call coc-codeaction-cursor, I get these options.

dharrigan20:10:56

I belive it's dependent on where the cursor is, for example, in clojure-lsp the "Resolve macro as..." is marked as a quick-fix

dharrigan20:10:55

If I do ,c on a macro, I get the popup thus:

dharrigan20:10:04

In clojure-lsp

stopa20:10:13

Okay will play. final noob question while I have you: I just updated neovim, and now if I get a floating window of suggestions (see screenshot) I no longer know how to cycle through the options and choose. I used to be able to use up and down arrow. Do you happen to know the way to “cycle” the choice in the floating window?

dharrigan20:10:51

I use j and k

dharrigan20:10:15

or in this case, shift+j and shift-k

dharrigan20:10:25

You may want to have a look at my overall vimconfig for some ideas if that is helpful

❤️ 1
stopa20:10:49

Definitely going to take a bunch of inspiration now

stopa20:10:04

Here is what I am seeing: If I am in insert mode, the floating window shows up, but I can’t type shift j or k without it inserting something. Maybe I need to start fresh

stopa20:10:41

I now realize that it is cycling if I do up and down arrows (just the theme doesn’t do a good job) — but now I am not sure how to select it

dharrigan20:10:22

For me, it's just <return>

dharrigan20:10:51

(or if I up/down and choose what I want, esc works just as well)

dharrigan20:10:15

or space and continue typing.

stopa21:10:17

Ahh so weird. I’ve deleting everything in my vimconfig. But alas enter does not work

stopa21:10:34

Aha! I needed to do

inoremap <silent> <expr><cr>        coc#pum#visible() ? coc#_select_confirm() : "\<CR>"
^ taken from your config — thanks @dharrigan!