This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws (1)
- # beginners (163)
- # boot (1)
- # bristol-clojurians (1)
- # cider (7)
- # clara (1)
- # cljs-dev (22)
- # cljsjs (1)
- # clojure (43)
- # clojure-denver (1)
- # clojure-finland (6)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-russia (1)
- # clojure-spec (1)
- # clojure-uk (6)
- # clojurescript (107)
- # cursive (4)
- # data-science (2)
- # datascript (2)
- # datomic (19)
- # duct (31)
- # emacs (1)
- # fulcro (50)
- # graphql (15)
- # hoplon (3)
- # lein-figwheel (2)
- # luminus (21)
- # off-topic (74)
- # onyx (3)
- # parinfer (15)
- # portkey (2)
- # precept (9)
- # proton (1)
- # re-frame (130)
- # reagent (73)
- # reitit (7)
- # ring-swagger (5)
- # shadow-cljs (61)
- # spacemacs (18)
- # specter (12)
- # uncomplicate (1)
- # vim (88)
- # yada (2)
@dave Still pretty difficult to set them up at all the different files, plus checking them out requires using or switching many namespaces
sayid looks quite nice, though with a bit of a learning curve. Like all powerful tools. But... I'd have to give up and take fireplace in 😕
If I ever get to the point that I feel it's worth the trouble to switch to fireplace, I hope I'll also have the time and energy to write a short article "This is how far you can go with simple solutions, and here's what you are missing"
i'm still not 100% convinced that fireplace is worth abandoning. is there a fundamental problem with the approach that makes it desirable to work on a new solution? i keep wondering if it might be better for us to focus our efforts on improving fireplace
I haven't abandoned it, I just have never used it. Being a ton of vimscript, I don't think I would ever delve into it to make improvements.
I like the unix like philosophy of Jeb's approach where I can combine it with different tools (I use screen to connect all the repls into same, and run it on a different screen... errr... monitor, I mean
Admittedly I haven't checked how that could be done in fireplace, but I'm assuming it's much more strongly coupled and can't be done with just some shell scripting
that's a good point. i also appreciate the simplicity of hooking into external tools instead of trying to do everything in vimscript
my one complaint, in practice, is that it's lagging behind cider in terms of features despite relying on the cider middleware
Check out vim-replant, it's my attempt at bridging that gap. I'm very annoyed that my simple pprint PR has been left for 8 months or so. So I've decided to strike out.
nice. i actually have vim-replant installed -- i did it a while back just for kicks, but i haven't dug into learning how to use it in earnest
Eventually I hope to replace fireplace. I'm only using it as a connection/session manager.
So, Vim+Clojure peeps, I've been hacking my setup a great deal lately, so let me dump the neat stuff I've made or am using!
First of is
parinfer-rust, a port of parinfer to rust that allows Vim to call it natively with libcall(), so is fast. It works with plain Vim, and does not need Neovim: https://github.com/eraserhd/parinfer-rust
It is the only Vim plugin that supports parinfer's smart mode, as far as I can tell, which is really awesome.
Next, vim-sexp, vim-sexp-mappings-for-regular-people, vim-fireplace. I think these are the usual suspects.
,r finds the repl terminal on this tab and focuses it. It opens one if there is none.
,, finds the repl terminal and sends it
<Up><Enter> and returns to the previously focused window. This is the dumbest thing, but also the biggest time saver. I use it to run tests or an expression like
(tools.namespace/refresh) (clojure.test/run-tests 'my.namespace).
And the hack that I'm trying to do right now is: using Vim's terminal emulator support for a weird escape sequence that sends a JSON blob to Vim so that my REPL command which loads code will move the cursor to and highlight a compile error.
Although, I guess I could do this with vim server, which would work in Neovim as well.
Yeah. Neovim just ate my plugins one day, so I went back to Vim, but I wanted parinfer, and there's a plain Vim port, but it was a lot slower and I'd already been spoiled.
On my wishlist: integration to post "signs" on all the tests that fail when I run them in the REPL.
Tests will be later, this is the "killer feature" I've been waiting for in order to write a better test runner than the one in fireplace
I loved vim-parinfer but it’s kinda janky and incomplete, but parinfer-rust is the real deal, holy mackerel
@eraserhd As one who only knows the basics of vim, do you have an example of how you would use it with libcall()?
That's an implementation detail that you don't need to use it. Other parinfer's are either in slow native VimL, or send the whole buffer over a socket connection and get a big blob back for every change. This one runs in the Vim process.
For those with no Rust experience (or installation), what do you recommend for getting
cargo available? (I’m macOS, if that matters)
This tool zealously stalks your local git repo, running full tests or build on the tip of every branch, bisecting to find an error if a branch is broken.
Thanks, I went with the homebrew option and gave it a spin. (once I did
cd cparinfer) Works as expected so far.
I have it installed under
.vim/pack/git-plugins/start/, as well, so can confirm that it works via that installation method, as well.
I switched over a while back and removed Pathogen, and haven’t noticed any difference yet.
So, as I read that article, I realize that the
git-plugins part of my path is freeform and could be anything.
if I have code like this
and delete the line starting with
(defn up-right [^longs a & is] (doseq [i is] (aor a i ubyte)))
dd, it ends up like:
(defn up-right [^longs a & is] (aor a i ubyte))
Not as part of
parinfer-rust. A neat thing of
parinfer-rust's implementation of smart mode, though, is that you can dedent the resulting form with
<< no matter how many lines it is.
I do it, mostly because I really like
<I. You have to set a global variable to tell
vim-sexp not to make its insert-mode mappings and they won't step on each other.
OK, so I have REPL-in-Vim8-indicating-compile-error-when-reloading-code working. This is a really rough sketch, but it works: https://gist.github.com/eraserhd/04efc2767f6c04aa232f6465c8f3d79d