diff options
| author | Robert Günzler <r@gnzler.io> | 2022-11-18 17:18:23 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2022-11-18 18:38:17 +0100 |
| commit | e2d9f4923d377a723f6aa204c168bdf4ff64500c (patch) | |
| tree | f3ef4b007a170950b4e40a9fafca01fa2d45d10a /.vim/after/ftplugin/gitrebase.lua | |
| parent | e92a1929b122305d1fb80b6eed2fb94f825ed178 (diff) | |
vim: refactor job module
Diffstat (limited to '.vim/after/ftplugin/gitrebase.lua')
| -rw-r--r-- | .vim/after/ftplugin/gitrebase.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/.vim/after/ftplugin/gitrebase.lua b/.vim/after/ftplugin/gitrebase.lua index c8a6221..50684f4 100644 --- a/.vim/after/ftplugin/gitrebase.lua +++ b/.vim/after/ftplugin/gitrebase.lua @@ -1,13 +1,12 @@ local commit_preview = function() local commit = vim.api.nvim_get_current_line():match([[ ([0-9a-f]+) ]]) - local j = package.loaded.job.jobstart { + local result = require('internal.job').jobstart({ command = 'git', args = { 'show', commit }, - format_title = function(_, _) return 'commit preview' end, + format_title = function(_, _) return 'git-show' end, populate_quickfix = false, - } - local result = j:wait():result() + }):wait():result() -- create buffer local bufnr = vim.api.nvim_create_buf(false, true) |