mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-24 16:28:22 -05:00
neovim: add asynctasks.vim
This commit is contained in:
parent
ac38c5dcc9
commit
58598d112d
61
home/.config/nvim/asynctasks.ini
Normal file
61
home/.config/nvim/asynctasks.ini
Normal 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
|
@ -70,6 +70,16 @@ function M.neogit_conf()
|
||||
}
|
||||
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()
|
||||
vim.g.mkdp_refresh_slow = 1
|
||||
vim.g.mkdp_filetypes = {
|
||||
|
@ -288,6 +288,21 @@ return require('packer').startup(
|
||||
},
|
||||
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 {
|
||||
'iamcco/markdown-preview.nvim',
|
||||
run = 'cd app && yarn install',
|
||||
@ -354,6 +369,6 @@ return require('packer').startup(
|
||||
use {'tweekmonster/startuptime.vim', cmd = 'StartupTime'} -- Just for benchmarking
|
||||
|
||||
-- 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
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user