Discussion about all editors used for Clojure/ClojureScript
snoe 2016-01-31T08:12:53.000009Z

If anyone's using neovim I've been working on a port of clj-refactor.el. Feedback, suggestions, contributions welcome here: https://github.com/snoe/clj-refactor.nvim

juhoteperi 2016-01-31T08:29:28.000011Z

@snoe: Interesting. I have implemented few features here using pure Vimscript: https://github.com/Deraen/vim-cider

juhoteperi 2016-01-31T08:29:39.000013Z

Looks like using Cljs/Node on neovim allows implementing threading nicely

snoe 2016-01-31T08:43:13.000014Z

@juhoteperi: yeah I think the ability to script vim with cljs is pretty huge (as in, it could end up being a better story than writing clojure plugins with emacs lisp) . I had actually looked at your project before starting but the thought of doing the transformations in vimscript put me off. On the other hand, I also really like the direction that the emacs project is taking and I figured I might be able get vim to catch up.

juhoteperi 2016-01-31T08:43:43.000015Z

Yeah using Cljs is definitely good idea. Will have to test to see how well it works.

juhoteperi 2016-01-31T08:43:56.000016Z

Is your plugin async?

snoe 2016-01-31T08:45:00.000017Z

yeah - although I'm using a weird mix of maintaining my own nrepl connection and using fireplace ... I'll have to clean that up while keeping it async

juhoteperi 2016-01-31T08:45:55.000018Z

Would be great to add async support to Fireplace or to provide alternative plugin

snoe 2016-01-31T08:48:15.000019Z

heh I was about to link to the fireplace issue but I see you raised it. I've tried diving into the problem a few times but I haven't had much luck grokking what tpope was saying there. https://github.com/tpope/vim-fireplace/issues/202

juhoteperi 2016-01-31T08:49:00.000021Z

Yeah I think the easiest way would be to test how it should work in a new plugin, and then to see how or if it can be added to fireplace

juhoteperi 2016-01-31T08:49:49.000022Z

Quite hard to refactor existing plugin to add async support, even though the architecture should support it

juhoteperi 2016-01-31T08:51:17.000023Z

Wohoo! I got it working!

juhoteperi 2016-01-31T08:51:31.000024Z

Maybe this will finally convince me to use Nvim

snoe 2016-01-31T08:52:20.000025Z

haha great, I've been using it for about a year now, and I've noticed very few differences or problems

juhoteperi 2016-01-31T08:52:35.000026Z

Hm, clean-ns is compaining about repl connection

snoe 2016-01-31T08:53:05.000027Z

yeah it looks up the dir tree for a .nrepl-port file

snoe 2016-01-31T08:53:27.000028Z

goes back to my fireplace comment

juhoteperi 2016-01-31T08:54:52.000029Z

Strange, the file should exist

snoe 2016-01-31T08:59:54.000030Z

hrm darn maybe lein npm install inside the plugin dir

juhoteperi 2016-01-31T09:01:51.000031Z

Ah, I was trying on cljc file and connect is only running on clj files

juhoteperi 2016-01-31T09:02:18.000032Z

Works great on clj file

benedek 2016-01-31T13:54:12.000033Z

Ha nice one @snoe. Perhaps the lighttable plugin can be useful example too (light-refactor by @rundis )

benedek 2016-01-31T13:54:50.000034Z

Basically a client for refactor-nrepl in cljs too afaik

dominicm 2016-01-31T14:05:27.000035Z

@snoe: I have async Fireplace working, I think. Or some stuff working anyway.

dominicm 2016-01-31T14:05:46.000036Z

I wish Neovim had async omnicomplete, I've had to switch my omnicomplete to manual for Clojure.

dominicm 2016-01-31T14:06:24.000037Z

https://github.com/radenling/vim-dispatch-neovim there we are

dominicm 2016-01-31T14:06:45.000039Z

Fireplace uses Dispatch to execute commands. I do appreciate having my repl be launched in a tab.

dominicm 2016-01-31T14:07:34.000040Z

Fugitive can use that too, which is nice when I notice it.

dominicm 2016-01-31T14:08:46.000041Z

You might be interested in my push to here last night btw https://github.com/SevereOverfl0w/vim-cljrefactor

juhoteperi 2016-01-31T14:11:04.000043Z

Afaik async omnicomplete can be achieved with some autocommands and calling complete from plugin when results are ready

dominicm 2016-01-31T14:11:39.000044Z

deraen: Deoplete has got async omnicomplete, but not with omnifunc sources.

dominicm 2016-01-31T14:12:29.000045Z

So yeah, the problem is perhaps more about being able to call omnifunc asynchronously.

juhoteperi 2016-01-31T14:13:23.000046Z

Hmm okey.

juhoteperi 2016-01-31T14:16:56.000047Z

@dominicm: What stuff does vim-dispatch-neovim affect in fireplace?

dominicm 2016-01-31T14:17:52.000048Z

@juhoteperi: The most obvious one is ":Console" which will spawn in a neovim terminal, instead of a new window.

juhoteperi 2016-01-31T14:17:54.000049Z

When I evaluate Thread/sleep it''s not async 😞

juhoteperi 2016-01-31T14:18:15.000050Z

Hmh, I don't care about that, I always open repl manually on separate terminal

dominicm 2016-01-31T14:19:44.000051Z

I almost always do also

dominicm 2016-01-31T14:19:57.000052Z

But for a while I wasn't, and it was super useful.

dominicm 2016-01-31T14:21:41.000053Z

I'm not sure if fireplace spawns out to dispatch for anything else.