conjure

:neovim:+:clj: https://github.com/Olical/conjure - If you're enjoying Conjure and want to say thanks: https://github.com/users/Olical/sponsorship :smile: (alt https://conjure.fun/discord)
2021-03-13T00:37:53.005500Z

Hey team! Quick question: what plugin do ya’ll use to autoformat your code? (Playing around with conjure and neovim now!)

➕ 1
berkeleytrue 2021-03-13T00:40:20.006900Z

I'd like to know that too. Having recently used HIndent for haskell and trying prettier for js, it kinda is a dream not to have to worry about format. Let the machine do the work.

❤️ 1
dharrigan 2021-03-13T06:58:36.007500Z

I use parinfer-rust and clojure-vim/clojure

2021-03-13T12:15:40.007800Z

nbardiuk 2021-03-13T14:56:07.009400Z

our team is using cljfmt, through calva and vim-iced But it is not hard to setup without a plugin: * in vimrc nmap <leader>f :!clj -M:cljfmt %<CR> * in deps.edn {:aliases {:cljfmt {:extra-deps {cljfmt/cljfmt {:mvn/version "0.7.0"}} :main-opts ["-m" "cljfmt.main" "fix"]}}}

❤️ 1
nbardiuk 2021-03-13T15:07:54.010400Z

turns out nrepl has format middleware that uses cljfmt, maybe it can be used in conjure https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/format.clj ?

Olical 2021-03-13T15:10:29.011800Z

I want to add support for the newer nREPL 0.8 operations + refactor/debug/format tools in CIDER (when they're present) but time. If anyone wants to have a go at contributing these things (wouldn't be too hard for some of them!) I'd be happy to review / guide / carry PRs across the line

Olical 2021-03-13T15:11:14.012700Z

There's a LOT of untapped power in CIDER right now, low hanging fruit in some cases. Although things like a stepping debugger (anything stateful) will require some UI / UX work that I'll try to handle since I have a bigger view of the system.

Olical 2021-03-13T15:12:14.013900Z

Formatting should be a case of * extract form under cursor * send off to CIDER * replace form range with result All of which have prior art in Conjure and Fennel modules / functions dedicated to performing this extraction / replacement in a buffer. It's how <prefix>e! works after all.

❤️ 2
Olical 2021-03-13T15:12:38.014600Z

I actually format data sometimes by just running <prefix>e! on it since the source data gets replaced by a pretty printed version

😮 3
Olical 2021-03-13T15:13:56.016100Z

My personal motivation for formatting is quite low since I've never relied on one for Clojure in years of professional development with it. No single formatting tool ever sat with me as "perfect", but I know for some teams it's a great thing to have as common ground. Not opposed to the idea, just not super driven to solve it right now, personally. Just some context 🙂

➕ 2
Olical 2021-03-13T15:14:34.016600Z

If there's no relevant issue on the repo, feel free to open one so we have something to track

2021-03-13T17:31:43.018500Z

Thanks for the deep responses team! I solved this for now, by using coc + clojure-lsp alongside conjure. Will look around gh and make an issue that notes the conversation above, as a someday/maybe.

🎉 1