Fork me on GitHub
#vim
<
2016-11-03
>
mikepjb10:11:00

Is there a builtin way of running async shell commands in neovim like :!some awesome task that would be best run in the background

dominicm12:11:16

Maybe :terminal command?

dominicm12:11:42

There's also termopen()

mikepjb13:11:36

ofcourse! thanks @dominicm

jebberjeb13:11:30

I like termopen() for when I want to run/view some command in a terminal window, but stay in normal mode.

mikepjb13:11:02

termopen() does not seem to work for me

mikepjb13:11:10

:termopen()

mikepjb13:11:32

is it used from ex mode?

dominicm13:11:14

It would be :call termopen() check the help for it. I've only really dabbled with the function

dominicm13:11:43

It's possible that something like neoterm provides the interface you're after

hkupty14:11:13

Iron.nvim makes use of termopen and provides nice bindings for clojure development

snoe16:11:37

@ingvij I'm not sure I had seen iron.nvim before, nice!

hkupty16:11:05

@snoe Glad you liked it! I'm currently focusing on acid.nvim, but iron already does help me a lot. Feel free to open issues if you think anything is missing 🙂

dominicm18:11:46

I need to see if iron can handle my test trick

dominicm18:11:59

If it can, I'll share the snippet here

hkupty21:11:33

@dominicm If you have any problem or need any help, please let me know!

hkupty21:11:34

I've just published v0.2 of acid! https://github.com/hkupty/acid.nvim This allows user to create commands and handlers for acid, making it a proper platform for asyncrhonous communication between neovim and the nrepl. There are currently two implemented commands: * AcidEval for evaluating a pice of clojure code on the remote REPL * AcidGoToDefinition, conveniently mapped to <leader>f to jump to the definition of the symbol below the cursor. Several more is planned on the todo: https://github.com/hkupty/acid.nvim/blob/master/TODO.md Please check out and try! I really need some input so I can keep making it better and better! Also, I'd love to see some plugins using this structure and providing even more features to acid. Feel free to criticize it, open an issue or a pull request! Hope you guys enjoy!

snoe21:11:16

There seems to be some overlap with the 0.3.0 TODO and https://github.com/clojure-vim/clj-refactor.nvim Needing to depend on fireplace was the main reason why I couldn't get magic-import from cider implemented (automatically import/require as things are typed). I'll look into using acid for that instead.

hkupty21:11:17

It'd be awesome if you could do that. I can totally take that out of the plan, so I can focus on making acid better extensible.

dominicm21:11:51

I'd prefer it if Acid was a small center like Fireplace.

snoe21:11:36

one of my big gripes with fireplace was the cqp eval buffer losing structural editing - i would love to have something like planck's parinfer there http://blog.fikesfarm.com/posts/2016-02-10-indenting-with-parinfer.html

hkupty21:11:29

The commands currently provided are mostly basic examples of how to implement a command.

hkupty21:11:34

I'll probably reach 1.0 prior to implementing all the features on TODO, provided that they're outsourced where makes sense.

hkupty22:11:56

One thing that comes to mind is allowing overriding handlers, so default handlers can also be overridden by more complete versions of them. For example, current ProtoRepl handler relies on AnsiEsc to colorize and is very simple to what and how to print. It could be overriden by a more robust implementation, that colorizes without needing external plugins