This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-05
Channels
- # announcements (14)
- # babashka (51)
- # beginners (154)
- # calva (24)
- # cider (4)
- # clj-kondo (24)
- # cljfx (11)
- # cljs-dev (3)
- # clojure (259)
- # clojure-europe (14)
- # clojure-nl (2)
- # clojure-seattle (8)
- # clojure-spec (6)
- # clojure-taiwan (1)
- # clojure-uk (52)
- # clojurescript (123)
- # conjure (43)
- # core-async (15)
- # datomic (14)
- # events (1)
- # fulcro (90)
- # helix (7)
- # jobs (6)
- # meander (10)
- # nrepl (1)
- # off-topic (13)
- # pathom (1)
- # portal (8)
- # re-frame (7)
- # reveal (11)
- # shadow-cljs (99)
- # spacemacs (11)
- # testing (11)
- # vim (63)
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
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
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.
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
That request, to append the output of the eval to the form, is under consideration by Oliver 🙂
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.
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
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.
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 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
Biggest benefit in Vim-iced is async evaluation. Like if you run tests on namespace that takes 15 seconds, it won't block Vim.
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 ...
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.
Yeh, but it looks like it overlaps with vim-iced.
vim-iced does pretty much everything clojure lsp plugin.
@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