nvim: plugins: Switch to vim-dispatch from asyncdo

It has a few more things than asyncdo and automatically handles makeprg
not that setting a custom command to handle makeprg with asyncdo was
a problem but still. Should also be useful for fugitive git push,
believe it will use dispatch when available.
This commit is contained in:
Sanchayan Maity 2021-10-17 14:31:11 +05:30
parent 936e6149de
commit 27dec93c97
4 changed files with 7 additions and 10 deletions

View file

@ -1,7 +0,0 @@
local remap = vim.api.nvim_set_keymap
remap('n', '<LocalLeader>b', ':Make<CR>', { noremap = true })
remap('n', '<LocalLeader>B', ':LMake<CR>', { noremap = true })
vim.api.nvim_command('command! -bang -nargs=* -complete=file Make call asyncdo#run(<bang>0, &makeprg, <f-args>)')
vim.api.nvim_command('command! -bang -nargs=* -complete=file LMake call asyncdo#lrun(<bang>0, &makeprg, <f-args>)')

View file

@ -0,0 +1,3 @@
nnoremap <unique> <LocalLeader>b :Make!<CR>
nnoremap <unique> <LocalLeader>B :Make!<SPACE>
nnoremap <unique> <LocalLeader>q :Copen<CR>

View file

@ -95,6 +95,8 @@ vim.g.vsnip_filetypes = {
}
-- dirvish
vim.g.dirvish_relative_paths = 1
-- dispatch
vim.g.dispatch_no_maps = 1
-- We do this to prevent the loading of the system fzf.vim plugin. This is
-- present at least on Arch/Manjaro

View file

@ -36,8 +36,6 @@ local init = function ()
use 'sindrets/diffview.nvim'
-- Boost vim command line mode
use 'vim-utils/vim-husk'
-- Run things async
use 'hauleth/asyncdo.vim'
-- Quickfix
use 'yssl/QFEnter'
use 'chengzeyi/fzf-preview.vim'
@ -61,7 +59,8 @@ local init = function ()
-- Tim pope essentials
use {
'tpope/vim-repeat',
'tpope/vim-sleuth'
'tpope/vim-sleuth',
'tpope/vim-dispatch'
}
-- Directory viewer
use 'justinmk/vim-dirvish'