ag.nvim
ag.nvim copied to clipboard
Propose: collaboration
Hello. You haven't been able to get in touch with ag.vim maintainer, but as -loosingkeys- specified once, he is the single one for now. So, you decided to rename plugin ag.nvim. However it has drawback, because anyone would prefer cross-vim plugin. Even if yours is currently working like that, its name implies it isn't. On pair with @albfan we currently refactored ag.vim codebase to more cleaner and modular solution and plan to fight with -loosingkeys- until the end -- to merge it in mainstream. If you would be able to join our collaboration and add your code to @albfan fork -- through pull-request / patch, or at least allow us to use it freely (however you as collaborator is better), we would appreciate it.
Just for asynchronous operations it would be a terrific adittion to plugin codebase
Hm, of course we review/correct it from PR. I have no means to merge it mindlessly. But someone interested, who could do this labour by himself on top of already existing work would be welcomed anyway, don't you think? It will be only disableable options after all. And async support is planned anyway. By the way, seems like part of his work already merged in mainstream.
You guys are free to use my code in any way you like. Due to my current work situation I have very little time left to actually spend on my on the side-projects. However I will try to find some time to actually reuse the code I have written here and create some PR's for @albfan his fork. Should I take too long doing this, every1 is welcome in reusing my code or just get inspiration from it. That's why I put it on github. Thanks for involving me in your attempt to improve ag.vim, I agree it's too good to be left for dead and I will try to put some work in it again.
As we are changing codebase deeply, I have compare rking master and numkill master and seems main differences are (as expected):
-
if !has('nvim')
- use of
jobstart()
,jobstop()
and callbacks for jobs likehandleAsyncOutput()
I think this can be easily reproduce on ag.vim native ag execution.
@numkil, we can benefit if you make some code review on ag.vim to integrate nvim async jobs. Something at high level would be enough.
Ok, the most important issue that I've seen in my time playing around with neovim's asynchronous api, almost 7 months ago, is that vader has no support for it. Testing async actions proved impossible then. I will do some research if things changed since then. For the rest I've decided to start playing with your code for a bit and see how far I get in implementing it again.
Thank! Great to hear.
We are totally agnostic about testsuite. Vader seems neat and powerful, but we are openminded to change testsuite or improve it.
don't know if something like this would work to test execution:
https://github.com/neovim/neovim/blob/master/test/functional/api/server_notifications_spec.lua#L25
or
https://neovim.io/doc/user/job_control.html, "on_exit" callback
@Numkil See https://github.com/albfan/ag.vim/tree/neovim for a testsuite using neovim (only for synchronous execution)
We can add support for async test to our test suite (if you find a way to add a handler on demand to plugin execution). See helper.vim for test initialization. Maybe *.nvim can be used to refer test with async execution.
See master has now a matrix build to support test on neovim.
https://travis-ci.org/albfan/ag.vim
To start with something, maybe we can define a test waiting a few seconds to test results.
Here:
https://github.com/albfan/nerdtree-git-plugin
you have another variation of test suite where test generates some output and test suite just compares it with expected output
https://github.com/albfan/nerdtree-git-plugin/blob/master/t/test1.vim https://github.com/albfan/nerdtree-git-plugin/blob/master/t/suite.sh#L47
Maybe that would be an easy way to test neovim.