Fork me on GitHub
#vim
<
2017-04-18
>
jebberjeb13:04:59

A writeup of some of my experiences with Clojure and Neovim (much of it already discussed here): http://blog.cognitect.com/blog/2017/4/17/clojure-for-neovim-for-clojure

devth13:04:14

was just reading it 🙂

dominicm14:04:26

It's weird, you can't say "rust" in a programming blog anymore without me stopping and saying "wait, the language or literal rust"

dominicm14:04:53

@jebberjeb link to your (blog?) is borked 🙂

dominicm14:04:58

https://github.com/jebberjeb/blog/blob/master goes here On link text: > "baroque, deranged and annoyingly useful mess"

jebberjeb14:04:57

think that's fixed it

dominicm14:04:59

@jebberjeb You linked to my blog ❤️

jebberjeb14:04:11

that post definitely inspired this one -- got to keep spreading the good word 🙂

devth14:04:47

awesome to see momentum around clojure + (neo)vim. i might have to dive in myself !

dominicm14:04:47

@jebberjeb I'm curious: What's the editor landscape like at Cognitect?

jebberjeb14:04:35

@dominicm I want to say there are 3-4 vimmers, then the rest are split 75% emacs, 25% intellij

reborg20:04:14

@jebberjeb I was checking the code. So in theory I could add another function in socketrepl.vim and a related command on the clj side in socket_repl_plugin.clj. I'm thinking about a possible clj-refactor integration

reborg20:04:13

But then I'd still need vim-script magic to replace/restructure forms etc..

jebberjeb20:04:13

@reborg so, in the function you'd add to socket_repl_plugin.clj, you can access the API, and get/set buffer contents.

jebberjeb20:04:31

So you could do it the way you've described, I think, or do it all in Clojure (I think).

reborg20:04:02

ah, that's it then, uber cool.

jebberjeb20:04:58

Yeah kind of neat to think about doing this stuff in Clojure. The core of it happens with https://github.com/clojure-vim/neovim-client. I don't know enough about clj-refactor to know this, but if you didn't actually need the socket repl, you could create a totally new plugin project to just do what you want, and kinda pattern it after socketrepl.nvim.

jebberjeb20:04:38

But if it would use the socketrepl to do anything, then yeah better to bolt something like that on to socketrepl.nvim.

reborg20:04:36

It seems to me that your architecture cuts down a lot of complexity compared to clj-refactor.nvim (requiring node.js) so the day of emacs-parity is getting closer 😉

jebberjeb20:04:57

I think you're right, that it is simpler in some aspects. A disadvantage of my approach is that, right now at least, the plugin itself is a java process. So it depends on how you feel about the cost of starting up a java process and loading the clojure runtime. I've been using it with socketrepl.nvim for months now and I don't feel it, but I think for lightweight plugins it is potentially a problem.

dominicm20:04:13

@reborg emacs reactor is built on a library called rewrite-clj. But it's actually got a jvm library too. No reason you shouldn't be able to get the functionality without writing much manipulation itself.