diff options
| author | Robert Günzler <r@gnzler.io> | 2021-11-02 17:43:28 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-11-02 19:06:48 +0100 |
| commit | da0a526a7c0447e3ca986cd86aeef4f4a26a1d5e (patch) | |
| tree | e230478a3ee1a6805862b3d940719eaf6ede2574 /.vim/lua/job.lua | |
| parent | a1149828dd403d4811e3615540cf8bbd98c56a6b (diff) | |
vim: add global telescope helpers
Diffstat (limited to '.vim/lua/job.lua')
| -rw-r--r-- | .vim/lua/job.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/.vim/lua/job.lua b/.vim/lua/job.lua index b6c34f7..9a235c4 100644 --- a/.vim/lua/job.lua +++ b/.vim/lua/job.lua @@ -6,9 +6,12 @@ local M = { current_jobs = {} } -function M.jobstart(opts, _wrap_command_for_presentation) - local opts = opts or {} +--create a new job and register +--@return /usr/local/share/nvim/site/pack/packer/start/plenary.nvim/lua/plenary/job.lua +function M.jobstart(opts) + opts = opts or {} + local title if opts.format_title then title = opts.format_title(opts.command, opts.args) opts.format_title = nil @@ -18,7 +21,7 @@ function M.jobstart(opts, _wrap_command_for_presentation) opts.enable_recording = true -- enable job:result() - opts.on_exit = vim.schedule_wrap(function(j, retval) + opts.on_exit = vim.schedule_wrap(function(j, _) spinner.on_progress('end', j.pid, j.pid) spinner.on_exit(nil, nil, j.pid) |