neovim: add asynctasks.vim

This commit is contained in:
FollieHiyuki 2021-09-04 23:23:13 +07:00
parent ac38c5dcc9
commit 58598d112d
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
3 changed files with 87 additions and 1 deletions

View File

@ -0,0 +1,61 @@
{cmake}
[project-init]
command=mkdir build && cd build && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .. && ln -s compile_commands.json ..
cwd=<root>
errorformat=
output=terminal
[project-build]
command=cmake --build build
cwd=<root>
errorformat=%f:%l:%c --> %m
output=terminal
[project-run]
command=build/$(VIM_PRONAME)
cwd=<root>
output=terminal
{meson}
[project-init]
command=mkdir build && meson setup --wipe build && ln -s build/compile_commands.json .
cwd=<root>
errorformat=
output=terminal
[project-build]
command=ninja -C build
cwd=<root>
errorformat=%f:%l:%c --> %m
output=terminal
[project-run]
command=build/$(VIM_PRONAME)
cwd=<root>
output=terminal
{single}
[file-run]
command="$(VIM_FILEPATH)"
command:c,cpp="$(VIM_PATHNOEXT)"
command:go="$(VIM_PATHNOEXT)"
command:python=python "$(VIM_FILENAME)"
command:make=make -f "$(VIM_FILENAME)" run
command:emake=emake -e "$(VIM_FILENAME)"
command:javascript=node "$(VIM_FILENAME)"
command:lua=lua "$(VIM_FILENAME)"
command:perl=perl "$(VIM_FILENAME)"
command:ruby=ruby "$(VIM_FILENAME)"
command:sh=sh "$(VIM_FILENAME)"
command:zsh=zsh "$(VIM_FILENAME)"
command:bash=bash "$(VIM_FILENAME)"
command:fish=fish "$(VIM_FILENAME)"
command:php=php "$(VIM_FILENAME)"
command:erlang=escript "$(VIM_FILENAME)"
command:ps1=powershell -file "$(VIM_FILENAME)"
command:scala=scala "$(VIM_FILENAME)"
command:haskell=ghci "$(VIM_FILENAME)"
command:applescript=osascript "$(VIM_FILENAME)"
command:vim=:source %
output=terminal
cwd=$(VIM_FILEDIR)
save=2

View File

@ -70,6 +70,16 @@ function M.neogit_conf()
} }
end end
function M.asynctasks_conf()
-- vim.g.asyncrun_open = 8 -- when using quickfix window (output=terminal is preferable)
vim.g.asyncrun_rootmarks = {'.git', '.svn', '.root', '.hg', '.projectile'}
vim.g.asynctasks_term_pos = 'bottom'
vim.g.asynctasks_term_rows = 10
vim.g.asynctasks_config_name = 'tasks.ini'
vim.g.asynctasks_template = '~/.config/nvim/asynctasks.ini'
end
function M.markdown_preview_conf() function M.markdown_preview_conf()
vim.g.mkdp_refresh_slow = 1 vim.g.mkdp_refresh_slow = 1
vim.g.mkdp_filetypes = { vim.g.mkdp_filetypes = {

View File

@ -288,6 +288,21 @@ return require('packer').startup(
}, },
config = tools.neogit_conf config = tools.neogit_conf
} }
use {
'skywind3000/asynctasks.vim',
cmd = {
'AsyncTask',
'AsyncTaskEdit',
'AsyncTaskList',
'AsyncTaskMacro'
},
wants = 'asyncrun.vim',
requires = {{
'skywind3000/asyncrun.vim',
setup = tools.asynctasks_conf,
opt = true
}}
}
use { use {
'iamcco/markdown-preview.nvim', 'iamcco/markdown-preview.nvim',
run = 'cd app && yarn install', run = 'cd app && yarn install',
@ -354,6 +369,6 @@ return require('packer').startup(
use {'tweekmonster/startuptime.vim', cmd = 'StartupTime'} -- Just for benchmarking use {'tweekmonster/startuptime.vim', cmd = 'StartupTime'} -- Just for benchmarking
-- TODO: rest.nvim, parinfer.nvim, editorconfig.nvim, conjure, nvim-spectre, -- TODO: rest.nvim, parinfer.nvim, editorconfig.nvim, conjure, nvim-spectre,
-- dial.nvim, asynctasks.nvim, hotpot.nvim, rust-tools.nvim, crates.nvim, go.nvim -- dial.nvim, hotpot.nvim, rust-tools.nvim, crates.nvim, go.nvim
end end
) )