vim 2023-02-04

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!

1

> I think it's better than the other plugins still. @dominicm How so?

In summary, it's the plug-in that leverages the most vim features rather than inventing new concepts.

That's good enough for me. That kinda makes sense. Most vim plugins suck now ๐Ÿ˜›

tpope writes all the best stuff

He's great ๐Ÿ˜ƒ

@seancorfield 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

I could write something for you regarding that

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.

I think forks are generally incompatible ๐Ÿ˜‰

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 ๐Ÿ˜„

Martynas Maciuleviฤius 2023-02-14T16:34:32.948369Z

> 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.

I'm a fan of vim-iced: https://github.com/liquidz/vim-iced

โž• 2

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/

๐Ÿ‘ 2
๐Ÿ‘๐Ÿป 1
โค๏ธ 1
๐Ÿ‘† 1

I still use fireplace. I think it's better than the other plugins still.

Martynas Maciuleviฤius 2023-02-06T09:47:20.723499Z

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 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 โ˜• !

๐Ÿ‘ 1

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.

@seancorfield 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!

@rahul080327 And vim-fireplace is just vim?

Yep

๐Ÿ‘๐Ÿป 1

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... ๐Ÿ˜•

โž• 3

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 #emacs #cursive #calva or #vim ๐Ÿ™‚ 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 ๐Ÿคฏ

โ˜๏ธ 1

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 ๐Ÿ™‚

@rahul080327 conjure works just fine without treesitter.

๐Ÿ‘ 1

I don't use treesitter at all in neovim

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 @seancorfield'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.

โž• 2
1

Thanks, @dharrigan -- That goes a bit beyond what I feel http://clojure-doc.org needs to explain since it's in the project docs.

๐Ÿ‘ 1

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: .

@seancorfield, 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."

๐Ÿ‘ 1