Fork me on GitHub
#vim
<
2022-11-04
>
Benjamin14:11:54

is there a post about a minimal neovim + clojure setup?

walterl14:11:24

It really depends on what you mean by "minimal". Surely REPL connection is included, so either Conjure () or vim-fireplace, or... not sure how vim-iced does it. What about clojure-lsp? Maybe not absolutely necessary, but certainly indispensable to me. What about structured editing (vim-sexp + vim-sexp-mappings-for-regular-people for me)? The rest are probably bells and whistles that more clearly fall outside of "minimal".

☝️ 1
1
dharrigan16:11:48

I have mine too

dharrigan16:11:02

neovim + conjure + coc-clojure + coc.

dharrigan16:11:15

(and clojure-lsp)

Benjamin08:11:37

thanks those look like good starting places

practicalli-johnny10:11:15

https://github.com/rafaeldelboni/nvim-fennel-lsp-conjure-as-clojure-ide is designed to be a relatively simple entry point into using Neovim with Clojure, with the essential tools you need for working with projects. This repo is what I based my own experiments on with Neovim and is relatively easy to understand. I find neovim quite hard to learn/use as my daily editor without a significant number of plugins, so my config quickly became less than minimal :rolling_on_the_floor_laughing:

👀 1
jmmk00:11:14

Personally I recommend not using fennel. Most configuration examples you will find will not be in fennel, so you will have to translate them. I do use lua instead of viml because it is very common in the neovim world, but even then you end up translating from viml to lua sometimes. So fennel is yet another translation on top of that. And from experience, if all you do is periodically update your config (rather than develop your own plugins for example) you will forget exactly how to write lua in fennel every time you come back to the config.

practicalli-johnny10:11:43

Personally, being able to use fennel & Conjure were the reason I first considered using Neovim as an editor. Treesitter was also a very positive influence, along with the LSP client. Fennel is much closer to Clojure, so for me it was easier to understand and work with. I always found Vim script quite opaque (I didn't see any other uses for Vimscript outside of vim, so didn't invest time learning it), so sadly was the reason I always avoided vim. The large majority of plugins I use are neovim specific with a setup function that is represented in fennel as a hash map of key value pairs, using keywords, strings or vectors as values. Just like Clojure, so it's easy to remember. I have helper functions in fennel that are very similar to Clojure function definitions, to process options and key binding configuration (again as key value pairs and data structures) There is also an online tool to convert between lua and fennel, although I haven't really use that myself. I can appreciate lua as a much easier language to use than Vimscript, but I still found fennel even simpler to understand. The vim community has also been extremely helpful in supporting the use of fennel. That said, if config is simply copy/paste from readme files, then lua is very simple to drop in. Most of the plugins I use need very little config as the defaults are pretty good.

walterl11:11:15

That's very interesting, @U05254DQM! I'll definitely not fault you for not wanting to learn VimL. In fact, I'd recommend newcomers to not learn it. Vim's refusal to pull in Neovim's Lua support (opting rather for a new, expanded VimL) is perhaps the biggest factor that settled the Vim vs Neovim issue for me. It's Neovim for me, and I'm not looking back. That said, I'm with @U08FV2128 for config. The translation from Vim→Lua→Fennel is really a bit too tedious. I gave the Fennel config thing a go, but soon reverted back to plain ol' VimL, sprinkled with lua <<EOF blocks for most plugin inits. My own plugins are written in Fennel, though (clearly 😛).

👍 1
rafaeldelboni13:11:39

When I was learning fennel and translating my lua configs to fennel I used this tool a lot https://fennel-lang.org/see I know isn't the best and I agree that is a bit tedious to translate existing configs, but after a while playing with fennel you won't need to translate that much, because you will have examples for most everything in your own config files. Another thing that is incredible with fennel is the repl support, so it allows you to do quick experiments with your configs and plugins. I think lua have it's own repl support in conjure as well now :), so is just a matter of preference. One tip about everything I said try to keep your configs simple either in lua or fennel :)

walterl13:11:17

> "Another thing that is incredible with fennel is the repl support" Definitely! It's great being able to test plugins while developing them. conjure

practicalli-johnny10:11:15

https://github.com/rafaeldelboni/nvim-fennel-lsp-conjure-as-clojure-ide is designed to be a relatively simple entry point into using Neovim with Clojure, with the essential tools you need for working with projects. This repo is what I based my own experiments on with Neovim and is relatively easy to understand. I find neovim quite hard to learn/use as my daily editor without a significant number of plugins, so my config quickly became less than minimal :rolling_on_the_floor_laughing:

👀 1