This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-04
Channels
- # announcements (1)
- # architecture (16)
- # asami (30)
- # babashka (1)
- # beginners (17)
- # calva (4)
- # clj-kondo (4)
- # clojure (32)
- # clojure-austin (2)
- # clojure-dev (16)
- # clojure-europe (33)
- # clojure-mexico (1)
- # clojurescript (40)
- # data-science (9)
- # emacs (33)
- # fulcro (1)
- # jackdaw (4)
- # malli (25)
- # off-topic (34)
- # pathom (23)
- # react (16)
- # reagent (8)
- # releases (5)
- # vim (46)
Hi folks, I'm trying to overhaul http://clojure-doc.org this year and I want to get a sense of how valid/outdated this section is: https://clojure-doc.org/articles/tutorials/vim_fireplace/ -- Is there an up-to-date, preferred guide that I should be linking to instead? Also, are there other popular vim/neovim plugins that http://clojure-doc.org should either try to cover or just link to? Thanks!
Maybe I should remove the fireplace-specific page and have a generic Editors page and point people to https://clojure.org/guides/editors#_vim_highly_efficient_text_editing (and maybe other things)?
For neovim I’d highly recommend https://github.com/Olical/conjure. This is a guide from the author: https://oli.me.uk/getting-started-with-clojure-neovim-and-conjure-in-minutes/
I use Neovim and conjure and wrote a little book about it https://practical.li/neovim/ This includes a fennel config
https://practical.li/clojure/clojure-editors/ covers the basics of many Clojure aware editors, feel free to copy or reference as required
I use conjure with vim (https://github.com/Olical/conjure). There's a tutorial (and an interactive school in the editor on how to use)
Thank you, folks! This is excellent information that I will incorporate into the new Clojure Editors page as soon as I've had a ☕ !
How does this work for vim folks? https://clojure-doc.org/articles/tutorials/editors/ I'm mostly deferring to the project docs, http://clojure.org's editors page, and http://Practical.li but wanted to provide a basic list of options and jumping off points.
@U04V70XH6 for vim-iced it should be vim/neovim. Works for both. Conjure is more specialised for neovim specific features and only works there with much deeper integration and more rich feature set like treesitter etc.
Deferring to the project docs is a good approach for me!
@U7ERLH6JX And vim-fireplace is just vim?
We had this massive split in the vim/nvim universe with nvim going with lua and vim 9+ their own new lang. Things aren’t very compatible nowadays 😅
Well as for fireplace, nvim can also technically run it but in practice no one uses it there I think. Because of the other 2.
And we wonder why setting up an editor environment for Clojure is confusing for newbies... 😕
Yeah it’s a bit of a free for all unfortunately
The way I sort of see it and have made peace with it is if someone is already using vim/emacs, they could might as well be thrown more diverse docs 😅 the confusing array of options is probably inherent here
Yeah... I tend to default to "What editor are you already using?" and if it's one of the four "most popular" for Clojure, just point them at #C099W16KZ #C0744GXCJ #CBE668G4R or #C0DF8R51A 🙂 Otherwise, I try to suggest whichever one of those is closer to what they're already using. I never got the hang of vim, TBH, but I've tried pretty much everything else for Clojure over the years (including Eclipse/CCW and LightTable and a few others).
(I can "get by" with vi
if I'm doing something basic on a remote server but that's about it)
Well I’m on the neovim train for about 5 years now and about 3 or so in vim before that. Still stumble on things every once in a while. Nvim using something standard like lua made it much more sane and approachable.
But I think the important bit like you and others mention is not to mix learning clojure along with a new editor too just because others seem to use it. That’s a 🤯
Maybe we can add a note on those lines too? 😄
Yeah, I'll add a disclaimer at the top of the editors page at some point 🙂
Yeah I meant it can use it if enabled and provide more features. It doesn’t work in vim is what I meant more.
To be clear then (mostly for @U04V70XH6's benefit and clear up confusion), neovim with conjure works fine without treesitter enabled. If you do want additional stuff, then yes, you can add in treesitter, but the out-of-the-box experience for clojure developers with the bog-standard install of conjure should get them quite the way there (it says this on the project website that it's technically optional, but highly recommended). Personally, I use conjure with clojure-lsp.
Thanks, @U11EL3P9U -- That goes a bit beyond what I feel http://clojure-doc.org needs to explain since it's in the project docs.
Theree are a few plugins that help (me) if you're interested (for clojure development)
I push up my vimconfig regularly (with mappings and so on). Here are the plugins I use for daily clojure development:
.
@U04V70XH6, the disclaimer paragraph looks great! what ive seen also helped newbies to clojure is saying that "there is no best editor for clojure, despite what you may be hearing. its mostly the editor pitch not clojure and all editors have a good clojure story now. no editor strives to be language specific."
I use Conjure and my own CIDER test runner mod for Conjure. What I want from Clojure editor is to edit text, evaluate into syntax-highlighted window, be somewhat lightweight and run CIDER tests. I don't want variable explorers, complicated editors and external programs. Maybe I'm used to work with simple data and sometimes you want to see lazy seqs and browse them. But I don't do it. This may not work for most people as I'm used to terminal. Link to my Conjure mod (this has a problem because CIDER can't execute CLJS tests): https://github.com/invertisment/conjure-clj-additions-cider-nrepl-mw
> I think it's better than the other plugins still. @U09LZR36F How so?
In summary, it's the plug-in that leverages the most vim features rather than inventing new concepts.
@U04V70XH6 You should also mention 'guns/vim-sexp', 'tpope/vim-sexp-mappings-for-regular-people', and 'guns/vim-surround'. These are useful plugins for dealing with s-expressions. There are also plugins for bracket matching, but I don't bother with that. There's also stuff to say about search matching
Surely someone's mentioned this already, but Neovim is a fork of Vim, not an extension. I think it's still compatible with Vim at the UI level, but not at the API level.
well its more than just a fork now. has its own lua ecosystem which is largely incompatible with vim. its compatible til vim 8 but not with plugins in vim9script. there are ways around it with https://github.com/tjdevries/vim9jit neovim mostly to keeps up with the changes in features in vim, actively pulling in patches but chooses to avoid vim9script.
yep, one can expect much more compatibility for vim things in nvim but not the other way round. and its been like that for a while now. things like vim-sexp and lot of tpope things are still the goto ones on nvim, no one wants a lua rewrite 😄
> has its own lua ecosystem which is largely incompatible with vim I think I heard that vim9 decided to implement features that nvim has because they started to fear that people will move to nvim. So it's not that vim and nvim aren't compatible -- it's just that vim9 decided to implement more features which aren't backwards compatible.