vim

For discussion on all things (neo)vim.
holymackerels 2020-12-19T04:19:58.266Z

👋 I recently made the switch over to neovim to try it out, and it seems that vim-clojure-highlight isn't happy anymore. Does anyone else use this on neovim? I don't know enough about the differences between vim and neovim to vet the plugin myself https://github.com/guns/vim-clojure-highlight

holymackerels 2020-12-19T04:21:24.266200Z

The last commit was >6 years ago so it's possible that it just doesn't work on neovim, but it feels odd writing clojure without it now

2020-12-19T04:52:08.266400Z

perhaps you might be interested in this: https://github.com/nvim-treesitter/nvim-treesitter

holymackerels 2020-12-19T05:01:37.266800Z

oh nice, that looks promising

holymackerels 2020-12-19T06:54:27.267Z

🤦 I forgot that I've been using a fork instead of the original

dominicm 2020-12-19T07:21:10.267200Z

There is a maintained fork of vim clojure highlight

dominicm 2020-12-19T07:21:41.267400Z

Someone in this channel

holymackerels 2020-12-19T07:37:36.267600Z

I'll see if I can hunt it down, it might be the one that I'm using

holymackerels 2020-12-19T07:41:36.270100Z

is there a way to execute forms inside of another repl client? for example, I'll typically have lein repl running in an adjacent tmux pane, ideally (for me) I'd like the output from cpp to print inside of that open repl

dominicm 2020-12-19T09:42:46.270400Z

I don't think nrepl supports that, but it's a good idea

2020-12-19T14:08:18.270600Z

I use Conjure, which prints eval results to a special Vim buffer. Not exactly what you’re looking for, but it’s a similar effect.

dave 2020-12-19T19:23:38.271200Z

I know this isn't exactly what you're looking for, and it's only relevant if you happen to use tmux, but in the past I've done something very similar with https://github.com/benmills/vimux

dave 2020-12-19T19:25:32.271500Z

It works with any kind of REPL. You can set up a key mapping / operator to send text to whatever process is running in the other tmux pane. Run a Clojure REPL there and voilà

dave 2020-12-19T19:26:40.271700Z

You can also do something similar with https://github.com/kassio/neoterm, except using terminal buffers inside (neo)vim

holymackerels 2020-12-19T22:34:20.272Z

oh nice, I'll give it a go. I've been using conjure with the split buffer which is pretty close but it's not as nice as tmux I think. I was poking around at nrepl and in theory it seems like you could hack together a server/client that would log out all of the evals it does while also providing a repl frontend

Olical 2020-12-21T11:01:43.273300Z

https://github.com/pinealan/niddle may be what you need there 🙂

Olical 2020-12-21T11:02:04.273600Z

I recently fixed it for use with Conjure too since it didn't support reader conditionals before.

holymackerels 2020-12-22T02:49:34.274900Z

This is me just not being all that familiar with clojure: I got it working adding the alias to my ~/.clojure/deps.edn and launching with clj -A:niddle, is there a way to use this everywhere I use lein repl, or do I also need it in each project.clj too?

Olical 2020-12-22T12:10:31.275400Z

You'll need to configure your ~/.lein/profiles.clj I think?

Olical 2020-12-22T12:11:11.275600Z

There's a :repl and :user profile that are enabled by default, so you can probably put something like {:repl {:nrepl-middleware ...}} in ~/.lein/profiles.clj, although I'm not sure what the exact option would be.

Olical 2020-12-22T12:11:44.275800Z

As in, that :nrepl-middleware key is pure pseudo code 😅

holymackerels 2020-12-19T07:43:03.270200Z

I'm not too familiar with nrepl, but it seems like lein repl is opening a server and then also a client connected to it so you can interact, is there a way to output things in that client from another client? I'd like to keep all of the output confined to the open repl instead of in vim splits/previews/etc