prabirshrestha / async.vim Goto Github PK
View Code? Open in Web Editor NEWnormalize async job control api for vim and neovim
License: MIT License
normalize async job control api for vim and neovim
License: MIT License
bug:
async.vim/autoload/async/job.vim
Line 324 in 2082d13
must be:
let l:vimjobinfo = job_info(l:jobinfo.job)
It appears that async.vim is trying to support a theoretical vim program that contained both the vim and nvim job api. Why?
s:job_supported_types builds a list of supported types, but won't there ever only be one type value for each platform? Even you we added a system() fallback, you'd only use that if jobs were unavailable.
I wanted to ask in case I misunderstood something before working on a simplifying PR.
Current implementation use 1024. This is smaller.
I send pull-request to vim/vim to make large size for Windows named pipe. When this pr is merged, we can change this size to 8192.
vim/vim#2548 makes it almost useless to use vimjob as it hangs vim. Would be good to default to it for vim8.
For some programs, no output will be given until its stdin is closed. One example is fzf
when it is being used as a filter to find matches in what's provided from stdin. I was using fzf
to write a preprocessor for asyncomplete.vim
, and having no "close stdin" function makes it hard to use async.vim
to make the code compatible with both vim and nvim.
My current solution is adding a close_stdin
function as what's done here. This solution is kinda awkward, as it doesn't follow the "interface similar to nvim" as other functions in this project. Also, at this point I don't think it is possible to create an interface which is compatible with vim that does everything nvim's interface does: nvim's chanclose
can close stdin, stdout or stderr, while vim only provides ch_close
which closes all channels and ch_close_in
which closes stdin.
I want to use this plugin to call rg
(ripgrep), but there's no option to set "pty" (for vim/neovim) and "stdin" (for neovim) or "in_io" (for vim).
How should I to set them?
In my testing this works very well with neovim, but with vim not so much... I have script that is called from BufEnter autocommand, and in neovim it triggers but in vim it does not seem to trigger on BufEnter, it seems to trigger on VimLeavePre though.
This seems like a really promising vim library. I'd like to see more projects migrating to rely on this, if it's robust enough. I'd love to be able to move the if has('nvim')
clauses out of my vimrc.
That being said, are you planning on adding unit tests? I don't have much time on my hands, but I may be able to help out if you can get something started. I'm not sure if you have a favorite vim testing framework yet, but I have some experience using vroom.
I am trying to re-write this logic
https://github.com/heavenshell/vim-jsdoc/compare/master...vimark1:patch-1?expand=1#diff-db0abe5fcd735715e60b30d8975cfa00
ie. is there an equivalent to package.json
in vim development? I am new to this ๐
Question:
I made a proposal for function summarization at asyncomplete-tags.vim. [asyncomplete-tags.vim issues # 9] (prabirshrestha/asyncomplete-tags.vim#9)
But I thought that the proposal would be difficult with async.vim's close / exit property of vim 8, and I closed it once.
It seems async.vim does not follow-up with this specification.
Or mode=raw was not affect?
see below
async.vim/autoload/async/job.vim
Lines 142 to 150 in 8eae0c4
and
reference : other job-wrapper implementation.
and document
https://github.com/lambdalisue/vital-Whisky/blob/master/doc/Vital/System/Job.txt#L111-L114
Suggestion:
If require workaround in async.vim, what kind of countermeasures do you consider and do?
It would be useful to switch to a package layout, i.e. put the async.vim
inside
start/async/autoload/async.vim
Then the user would put it under pack/async
. Check :h package-create
. I checked that this works in vim-8 and nvim-0.2.0.
This would also solve FrigoEU/psc-ide-vim#61
I have been thinking of having rpc support for quite sometime. This would be provided by rpc.vim
which depends on job.vim
. It could then use stdin/stdout to communicate with the servers.
Is it possible to not make cursor flicker when async job completes?
NVIM v0.6.0-dev+nightly-481-g6f48c018b
Build type: Release
LuaJIT 2.1.0-beta3
Hi, I just tried out the example from the Readme and it crashes in the handler on_exit
due to a:data
being of type number
and not list
.
function! s:handler(job_id, data, event_type)
echo a:job_id . ' ' . a:event_type
" Error happens here as join() expects a list
echo join(a:data, "\n")
endfunction
Am I correct that this is simply a bug because on_exit
returns the status code of the command?
I am running Vim version 8.2 1-4745
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.