Fork me on GitHub
#vim
<
2023-02-04
>
seancorfield23:02:15

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!

nice 2
seancorfield02:02:11

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)?

lispyclouds07:02:44

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
👍 4
👆 2
2
practicalli-johnny10:02:38

I use Neovim and conjure and wrote a little book about it https://practical.li/neovim/ This includes a fennel config

practicalli-johnny10:02:44

https://practical.li/clojure/clojure-editors/ covers the basics of many Clojure aware editors, feel free to copy or reference as required

dharrigan10:02:25

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)

seancorfield17:02:50

Thank you, folks! This is excellent information that I will incorporate into the new Clojure Editors page as soon as I've had a !

👍 2
seancorfield20:02:11

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.

lispyclouds20:02:58

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

lispyclouds20:02:16

Deferring to the project docs is a good approach for me!

seancorfield20:02:01

@U7ERLH6JX And vim-fireplace is just vim?

lispyclouds20:02:39

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 😅

lispyclouds20:02:50

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.

seancorfield20:02:34

And we wonder why setting up an editor environment for Clojure is confusing for newbies... 😕

6
lispyclouds20:02:57

Yeah it’s a bit of a free for all unfortunately

lispyclouds20:02:24

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

seancorfield20:02:25

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

seancorfield20:02:24

(I can "get by" with vi if I'm doing something basic on a remote server but that's about it)

lispyclouds20:02:03

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.

lispyclouds20:02:59

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 🤯

☝️ 2
lispyclouds20:02:39

Maybe we can add a note on those lines too? 😄

seancorfield20:02:19

Yeah, I'll add a disclaimer at the top of the editors page at some point 🙂

dharrigan21:02:17

@U7ERLH6JX conjure works just fine without treesitter.

👍 2
dharrigan21:02:28

I don't use treesitter at all in neovim

lispyclouds21:02:12

Yeah I meant it can use it if enabled and provide more features. It doesn’t work in vim is what I meant more.

dharrigan21:02:29

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.

4
partyparrot 2
seancorfield22:02:55

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

👍 2
dharrigan07:02:43

Theree are a few plugins that help (me) if you're interested (for clojure development)

dharrigan07:02:45

I push up my vimconfig regularly (with mappings and so on). Here are the plugins I use for daily clojure development: .

lispyclouds07:02:32

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

👍 2
dominicm09:02:23

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

Martynas Maciulevičius09:02:20

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

marrs15:02:35

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

dominicm15:02:24

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

marrs15:02:59

That's good enough for me. That kinda makes sense. Most vim plugins suck now 😛

marrs15:02:14

tpope writes all the best stuff

dominicm15:02:27

He's great 😃

marrs15:02:12

@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

marrs15:02:54

I could write something for you regarding that

marrs16:02:10

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.

lispyclouds16:02:11

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.

marrs16:02:08

I think forks are generally incompatible 😉

lispyclouds16:02:58

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čius16:02:32

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