This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-11
Channels
- # aws (2)
- # babashka (11)
- # beginners (107)
- # calva (6)
- # cljsrn (18)
- # clojure (180)
- # clojure-australia (6)
- # clojure-europe (54)
- # clojure-losangeles (9)
- # clojure-nl (4)
- # clojure-uk (13)
- # clojureladies (1)
- # clojurescript (57)
- # clojureverse-ops (1)
- # consultantsdirectory (1)
- # cursive (48)
- # datomic (11)
- # defnpodcast (3)
- # degree9 (1)
- # deps-new (5)
- # depstar (21)
- # docker (2)
- # fulcro (15)
- # helix (32)
- # kaocha (1)
- # lsp (21)
- # malli (15)
- # meander (15)
- # news-and-articles (2)
- # nextjournal (1)
- # off-topic (42)
- # pathom (3)
- # podcasts (1)
- # polylith (73)
- # protojure (1)
- # re-frame (43)
- # reagent (1)
- # releases (1)
- # restql (1)
- # schema (1)
- # sci (1)
- # shadow-cljs (23)
- # spacemacs (7)
- # sql (5)
- # tools-deps (42)
- # vim (15)
- # xtdb (3)
My dear colleagues are unfortunately stuck using Emacs, and they're using clojure-mode to format their code. This brings some friction as whatever I'm using to format Clojure in Vim has enough differences to create whitespace diffs all the time. Especially in namespace requires etc.
Is there a vim plugin that deals with Clojure formatting in a way pretty similar to Emacs? I'm happy to have it even as a pre-commit hook or a on-save hook that runs things through an external process.
my gordian knot solution to this stuff is to use fugitive to highlight diffs and not check in whitespace only changes
this can be done without editor tooling via git add -p
to fix changes interactively in the terminal
in general treating the diff of any given commit as a thing you have signed your name on and making it as small and pretty and meaningful as possible goes a long way :D
Oh for sure! I found out about chunks when git came out and it was a game changer. I use it as a pre-review round. But this file is very long and sifting through it is tedious.
https://github.com/weavejester/cljfmt has a lot flexibility. I am not sure if you can make it format code exactly as emacs but I would start there.
Perhaps I should be asking this to the Emacs channel 🙂 I think Vim is flexible here, as I can always pipe the contents of the buffer through an external program if needed.
You can also bind a command, so :Format
calls out to an external program for example
I see also this: https://github.com/google/vim-codefmt
external tools are the way to go, because you can also integrate them into things like CI
I've used zprint in "indent only" mode successfully in the past. But ideally whatever I'm already using to format code would be closer to what Emacs is doing. I'm curious if anyone has experience collaborating with Emacs users without this kind of trouble?
Is anyone using nvim + iced + reveal?
Got it. For anyone looking:
iced repl --middleware=vlaaad.reveal.nrepl/middleware