Open xanderdunn opened 9 years ago
This sounds like a good idea. Can you link me to some docs where I can read about how to add neovim support to this plugin? It might be a good idea for me (or whoever implements this) to add vim-dispatch support as well, for people who use that.
Thanks for your interest!
Start with NeoVim's wiki article on plugin architecture. It links to NeoVim's remote plugin help page, which is probably the single best source of documentation on making a NeoVim remote (asynchronous) plugin.
You might also look at the changes made to YouCompleteMe to support the NeoVim plugin architecture.
Finally, I think another good example of a NeoVim plugin is the Floobits plugin, which is a plugin built intentionally for NeoVim's plugin architecture, not supporting legacy vim plugin architecture.
I'm also trying to learn how to NeoVim-ify plugins so that I can help make a lot of plugins asynchronous.
There's also this: https://github.com/junegunn/vim-plug/pull/103
@Pyrohh Ohh, that's great! Thanks! The more examples to learn from, the better!
Any work being done with this?
None by me yet. I need to set up neovim and get started. Hopefully in the next couple of weeks, but I can't be sure. PRs welcome :)
Wish I had time to stuff like this.. =/
FYI, Dispatch support was added to ack.vim pretty easily: mileszs/ack.vim#126.
Hmm, I wonder if we should do something like that, and maybe have option(s) to say "use other plugins" if they're available. That way maybe it uses Dispatch by default, but you can still turn it off (to get the previous behavior, where it's not opening up other terminals/tmux splits/whatever).
I installed neovim, but had some issues with it's python usage. I think it's one of those things where they put python
instead of python2
in the #!
and arch users have trouble. I'll need to fix my install before starting work on this one.
I actually started hacking on Dispatch support, and it's more of a can of worms than it looked. The implementation on ack.vim wasn't very good/thorough/documented, needed some follow-up fixes, and has other extant bugs and shortcomings that I'm realizing as I've tried adding it to ag.vim.
It's not that difficult, per se, it just ends up not being a very natural fit. For instance:
:make
replacement primarily—it's actually not currently possible to use location lists instead of quickfix as far as I can tell, so that leaves :LAg
and friends out of the party. I think having those commands automatically use quickfix instead when Dispatch is in use is a bad idea, they're intended to be separate for a reason. I use :LAg
when I have compile/test results already in quickfix that I don't want to get bumped down the :colder
stack, etc.I got far enough already that I'll probably open a pull request anyway once I finish and re-share these observations for discussion, but because of these and because ag is so friggin' fast already, I decided to set it aside to work on another feature I'm more interested in.
Of course this is just Dispatch. Onward and upward with discussion of NeoVim :smile:
@losingkeys Since NeoVim has shed internal support for other languages, have you installed the python package for NeoVim support: pip install neovim
? Just making sure.
@alexdunn I didn't read the install instructions, just thought I'd install the editor and it'd work. I'll give that a shot, thanks!
Here's a screenshot of what I see when I open a file (opening the editor seems to work):
I'm thinking it's a python 2/3 issue. Do you know an obvious fix? Otherwise I'll poke around a bit myself.
Had the same problem. Install python2 version of the neovim stuff.
Odd. I used the aur script to install it. I'll give that a shot though. Thanks.
Any progress on this feature?
None from me, other than I found out I had both the python 2 and 3 versions of neovim
installed. Not sure if I did that or the AUR script did. Either way you'd think it wouldn't be in the 3 repos if it doesn't work. Anyway it'd be nice to get dispatch/neovim support in the same pull, but like I said I haven't made any progress yet :smile:
Found a grep plugin that uses nvim's job control and dispatch.
Here's the nvim part: https://github.com/bruno-/vim-man/blob/master/autoload/man/grep/nvim.vim
This would be :spades:
I have made async support for ag.vim in my fork. Some feedback would be nice. It works atm only for :Ag and :LAg. It also supports my current running pull request for searching from root of project if you choose this. https://github.com/Numkil/ag.nvim I'm still working on it.
Thanks @Numkil, will check it out.
:+1: You are welcome, It is a very fun learning experience. A small remark though, running ag in your /home/ searching for a common word (Something that generates thousands of hits) will still crash vim, due to the way how I have to capture and save the output from the shell job(list operations are expensive in viml). Running long jobs is not a problem as long have you have a reasonable amount of hits.
FYI: mhinz/vim-grepper by @mhinz does async ag calls using Dispatch and Neovim. His implementation is a bit different though and it doesn't really function as an ag.vim replacement.
This would be a great plugin to make asynchronous because searches often take considerable time where I could be looking through my code instead of staring at ag std output.
NeoVim users could immediately benefit if ag.vim were to support NeoVim's new asynchronous plugin architecture.