vim

perrygeo 2024-06-11T15:18:57.910099Z

So I'm re-discovering clojure after a long haitus, which means setting up neovim with all the REPL goodness. I've got Conjure, clojure-lsp, vim-sexp-mappings-for-normal-people, and nvim-treesitter-textobjects and the whole thing works like a charm. I'm really very happy with it. Kudos to everyone who's worked on these plugins!!

perrygeo 2024-06-11T15:22:39.177319Z

I still repeatedly hear "You MUST learn Emacs to be productive in Clojure/Lisp". But there's very little discussion on why - what features does an emacs+slime setup get me that this neovim setup doesn't? Most emacs advocacy feels more tribal than empirical. edit: sorry if this was confusing, What I intended to convey was that I'm looking for a list of actual missing functionality, not a general discussion on emacs vs vim.

🤔 1
practicalli-johnny 2024-06-11T16:53:35.665469Z

There is a mix of editors commonly used, Emacs, VSCode, Intellij, Vim/Neovim, SublineText https://practical.li/clojure/clojure-editors/#clojure-editor-features A majority of Clojure developers do use Emacs, in part because it was the first editor to provide Clojure support and being configured using a lisp language. There are several common configs (Spacemacs, Doom, Prelude, Corgi) or many people roll there own. So there is a very wide range of what an Emacs setup can look like. The unbiased advice that most people give is to use the editor you are most familiar with (reducing the learning curve)

perrygeo 2024-06-11T15:26:29.398869Z

Or to put the question differently, what other goodies do I need to add to neovim to get roughly to feature parity with a full emacs setup?

James Amberger 2024-06-12T12:59:46.150589Z

yeah vim-iced does more with nrepl etc. I tried it and realized I didn’t want to switch from vim-fireplace. Some of the things iced does that fireplace doesn’t can be handled by the LSP, notable exception of the debugger which I don’t think i that important to me but who knows maybe if I had it at hand I would find to the contrary.

James Amberger 2024-06-12T13:01:23.211719Z

overall it would be nice if this were less of a journey, and if keymapping genius @tpope would write the maps for vim-lsp etc so I don’t make a mess of my own UX.

practicalli-johnny 2024-06-11T16:39:51.084319Z

I suggest that all that is needed for Clojure development is • A repl client, e.g Conjure • Clojure analysis - i.e. clj-kondo (usually via Clojure LSP) • Structural editing, e.g a paredit and/or parinfer plugin (there are several of these) • Format, Refactor, etc - Clojure LSP All the other goodies I have are about usability in general and not Clojure specific, e.g neo-tree, neogit, telescope, noice, which-key, alpha (startup dashboard) and many many more...

👍 1
perrygeo 2024-06-11T16:51:47.309709Z

Yeah I'm already firmly entrenched in the neovim world which is why I'm delighted that Clojure support is so good. I don't want to switch to emacs unless there was really a compelling reason.

practicalli-johnny 2024-06-11T16:59:14.681319Z

Emacs Org mode is the most obvious thing I can think of that Emacs has and Noevim does not (or I haven't found an effective plugin for yet).

practicalli-johnny 2024-06-11T17:08:55.905479Z

I switched from Emacs to Neovim in part because of the excellence Conjure plugin, also the Neovim Treesitter support (which is arguably further along than Emacs support). Conjure and Clojure LSP work very well together (although I haven't found a nice support for renaming a namespace ns name & its filename) Neogit is a very good implementation of the Magic Git client for Neovim. Emacs Cider does have a nice step debug tool and data inspector. Although using Portal with Neovim more than covers the Cider inspector. The flow storm debugger could be used as a step debugging with Neovim. Or conjure maintainer is working on a DAP debug tool. So whilst I still love Emacs, Neovim fits my workflow more these days and is always very fast and slick experience.

2024-06-11T20:24:32.269879Z

If you are using nrepl, then https://docs.cider.mx/cider-nrepl/nrepl-api/supplied_middleware.html and https://github.com/clojure-emacs/refactor-nrepl implement various nrepl middlewares with https://docs.cider.mx/cider-nrepl/nrepl-api/ops.html. But no vim clojure plugins use them all. To my knowledge only https://liquidz.github.io/vim-iced/ make use of many of them.

👍 2
perrygeo 2024-06-11T20:44:25.440889Z

That's a great list to start with, thanks. I'm looking through the conjure source to see what ops it uses vs what's available. First thought is that conjure is fairly conservative in what parts of cider it uses, preferring to use core repl commands. In other words, there's a lot of cider functionality left on the table.

perrygeo 2024-06-11T20:44:41.612549Z

I'll have a look at vim-iced

sharky 2024-06-11T16:15:23.156279Z

I think this discussion is not up to date. There are several options how to run your development environment. Vim , eMacs , VScode choose what you like. I don’t know any limitation on using Clojure with neovim.

perrygeo 2024-06-11T16:43:54.287629Z

Excellent. I'm happy and productive with nvim for clojure. It's awesome actually. I just have some FOMO everytime someone waxes eloquent about emacs. I want to know what specifically I'm missing 🙂 But it sounds like not much.

practicalli-johnny 2024-06-11T17:12:11.132069Z

There is arguably a huge amount more you can do with Emacs. It is described by many people as an operating system in itself, usually because 99% of anything you want to do on a computer can probably be done in Emacs. Weather somebody needs all those things is a different matter.

sharky 2024-06-11T19:08:07.757839Z

I can highly recommend https://www.youtube.com/watch?v=urcL86UpqZc&pp=ygUKZW1hY3MgdXNlcg%3D%3D

😆 1
perrygeo 2024-06-11T20:31:51.884079Z

I used emacs in university while I was learning unix. I loved it, and I certainly see the appeal. Then I watched someone open a file in vi, edit it, save it, and exit ... faster than emacs could even load. Life's too short to deal with laggy dev environments. Though that was 20 years ago, I'm sure emacs is faster now, hopefully.