I'm a long time nvim user and I'm looking at possibly moving from Cursive (IDEA plugin) to a vim based editing workflow, mostly for the editing speed and having a lighter environment. What's the state of the art now for using Clojure with vim? I write other languages with coc for completion and a language server, and that's pretty much it. I'm pretty into the sexp editing experience so I'd like that as well. EDIT: Perhaps this is a solution https://oli.me.uk/getting-started-with-clojure-neovim-and-conjure-in-minutes/
I use Conjure, have done for nearly the very beginning. It's a great tool. I also use it with clojure-lsp and CoC
All works wonderfully
There is the #conjure channel if you need more support.
Actually I think that's the emotional support I was looking for 😃
You'll find plenty of TLC here and in #conjure 🙂
That post is from me, so AMA if you have questions 😄
Hah 🙂
Neat! One question is around autocomplete - is that provided with Conjure as well?
So it supports vim's built in "omnicomplete", which isn't reaaaaly autocompletion since omnicompletion locks up the editor while it does it's thing. It does however have built in support for https://github.com/Shougo/deoplete.nvim, so if you have that installed you get fully asynchronous autocompletion right away! There's also plugins that connect Conjure to things like CoC and a few other neovim specific completion libraries.
But yeah, omnicomplete is fully supported and there's support for various autocompletion plugins, including built in deoplete support (since it's the one I use so I support that one directly)
Ah, I've used CoC for a while and think that works well as the "frontend" for completion, I'm curious about what "backend" to use, Conjure or the LSP.
https://github.com/jlesquembre/coc-conjure here's the support for Conjure + CoC
I don't use it, but I think it works well!
And yeah, full LSP based tooling works great too, I only rely on Conjure and my REPL but I know it works great for some.
Seems cool, I'll just give both a try and see what happens 😃
One other curious george question, can I control the printing from the REPL? I often want to append output to a source file while experimenting or writing a rich comment block
(+ 1 1) ; 2
I use coc-conjure
That request, to append the output of the eval to the form, is under consideration by Oliver 🙂
It was talked about a bit before the holidays
It does output the results of the eval as virtual text beside the form, but nothing yet to make it into a comment.
I think Oliver can pitch in more about his thoughts around this (I think it was a matter of determining demand?)
Now you're providing more evidence of people wanting this feature (I didn't personally), so I'm getting gradually more convinced 😅 I mostly have the ability to do this, the framework is there. There's also <prefix>e!
if you want to replace the code with the result. Every result is also placed in the c
register by default I think? So you can do <prefix>eeA ; <c-r>c<esc>
for now potentially.
(I would like that feature too.... 🙂 )
I configured my Conjure to place all results in my "
register for speed
ah 🙂
Yep, I think it's gotta happen at some point 😅 if someone would like to raise an issue so I don't forget (and add comments / emoji to share ideas and support of the idea) that'd be amazing
It's super effective for screencasts and saving output in comment blocks
I'll add an issue
but if it's already in a register I'm fine with that too 😃
<c-r>c
then?
Yep, it should be c
by default. It's in the :help conjure
somewhere too. I think the "add the result as a comment" feature is a good idea though.
Yeah, possibly as repl "mode" or something, it can be quite effectful
Would it not be under a different mapping? Say, <prefix>ec
to evaluate the current form and append the result as a comment? Or were you thinking a setting you flip on that appends all results no matter what action you took?
Ah yeah I guess that wouldnt matter as much for me, probably a separate mapping is good/better
I would support having a differnet mapping
I wonder how conjur and vim-iced compare, I have been using vim-iced has anyone used both and found one to be better than another?
seems that most people have moved to conjure or vim-iced, eh? Been a bit since I worked heavily in clojure but vim-fireplace always had everything I felt I needed - is it considered archaic now?
^i'm not sure how we could definitively answer that, unless maybe github provides metrics for repo clones
i have seen more and more people talking about alternatives to fireplace over the last few years my assumption (based on no evidence whatsoever 🙂 ) is that fireplace is probably still the most popular plugin for clojure development in vim, simply because it's been around for so much longer
up until about a year or so ago, i would have recommended that a newcomer who wants to do clojure dev in vim should use fireplace because it's more mature/stable, but at a certain point, conjure became stable enough that it's what i would recommend nowadays
to be fair, it was quite stable even in the early days 😄
fireplace is still actively maintained, so i wouldn't call it archaic
i think conjure and iced give you a lot more features
Biggest benefit in Vim-iced is async evaluation. Like if you run tests on namespace that takes 15 seconds, it won't block Vim.
^that's exactly why i began to explore fireplace alternatives!
Though I see that Fireplace 2.0 mentions running tests async, but I think it still doesn't run normal cpp
etc. async.
i've tried both iced and conjure. ended up loving conjure. iced was also great, i think i was just trying it early on and it couldn't quite do all the things i wanted it to do at that time
i expect that iced has improved substantially over the past few years. i keep hearing great things about it
With latest vim-fireplace you can push long-running evaluation into background with ctrl+d, making it finish asynchronously
I am embarrassed 😁 to say this, but the reason I did not choose fireplace is I could not figure out how to install and use it. I found vim-iced documentation super easy to follow. It seems to do everything except lint so I use clj-kondo via https://github.com/iamcco/coc-diagnostic Maybe one day I will try conjure ...
@timofey.sitnikov That's surprising since I've seen the author of vim-iced use clj-kondo specifically for analysis
No reason to implement linting in vim-iced as there are lots of existing linting plugins
OK, so yes looks like the author of vim-iced uses clj-kondo via ale, I just use it via coc-diagnostic.
Ah and yes, Iced can use kondo analysis data for some operations: https://liquidz.github.io/vim-iced/#static_analysis_clj_kondo
what exactly does this plugin do? :thinking_face: is it a replacement for ALE? is it just making it so that you can see multiple linter warnings/errors at once, instead of just one?
coc-diagnostic a plugin for COC, https://github.com/neoclide/coc.nvim. Yes it can aggregate from multiple linters, but I just use the clj kondo. Coc is an amazing tool for C/C++, thats what I have done professionally. I am not sure that it provides any advantages in clojure.
i use COC too, it's great! i have it set up to use clojure-lsp, and it's amazing
Yeh, but it looks like it overlaps with vim-iced.
vim-iced does pretty much everything clojure lsp plugin.