Fork me on GitHub
#vim
<
2018-10-29
>
schmee13:10:06

is there a way to get a setup where have two splits: a left split with clojure code, that you can eval and have the output show up in the right split?

schmee13:10:32

when I eval stuff with Fireplace it only shows up in the status bar and I don’t find that all to useful πŸ˜•

dave13:10:29

you might find https://github.com/kassio/neoterm useful

πŸ‘ 4
dave13:10:40

it gives you a more convenient way to use :terminal buffers, including bindings for sending input to the terminal buffer. apparently there is support for REPLs, although i don't see clojure in the list, so it might take a bit of finagling to get working fully

dominicm14:10:29

I think justin has a version of this too

dominicm14:10:09

I haven't tried it, but I love his other plugins. Also author of neovim gets points just for that πŸ™‚

dharrigan14:10:02

I'm a bit pedantic about these things, but in Vim, if you have a list of ":require's", is there a way to sort the list? (like in Java, where the "imports" can be sorted)

dominicm14:10:41

@dharrigan if you're using rust-parinfer, then :sort works quite well.

dominicm14:10:01

@dharrigan otherwise, you're going to want to use nvim-refactor.nvim's clean-ns functionality.

dave14:10:02

while we're on the subject of pedantic formatting of ns requires: i use clj-refactor.nvim's "clean ns" binding all of the time and quite enjoy it, but i always find myself adjusting the vertical alignment after i use it. for example, i would adjust this:

[foo.bar.baz :as fbb]
[some-longer-thing :as slt]
to be like this:
[foo.bar.baz       :as fbb]
[some-longer-thing :as slt]
does anyone else do this? seems like something i could contribute to clj-refactor, at least as an option that's disabled by default

dominicm14:10:44

I hate vertical alignment. πŸ˜„ We wrote a regex at some point to destroy it after intellij ruined all the code.

πŸ˜‚ 4
dave14:10:55

ha! go figure πŸ˜›

dave14:10:15

i too hate it sometimes. i think it can be taken too far

dave14:10:41

but when you have a long list of ns requires, i find it quite helpful. then again, i can be very pedantic about stuff like this in general πŸ™‚

devth14:10:11

maybe you could use a mapping that runs clean ns for you then aligns it with something like https://github.com/junegunn/vim-easy-align

dave14:10:26

oh, nice. i like that idea. solving the real problem

schmee14:10:12

I also really don’t like alignment, it always messes up diffs and makes tiny changes look huge

schmee14:10:33

and everybody has a different idea about how to align things

πŸ‘ 12
devth14:10:46

same. it looks kinda pretty but it's annoying to maintain and about impossible to keep consistent within a codebase