Last active
December 15, 2024 22:16
-
-
Save bevancollins/9bd04deb6ca14ccd75fee8652fcb7ad8 to your computer and use it in GitHub Desktop.
Execute invoke tasks (https://www.pyinvoke.org/) from neovim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim.api.nvim_create_user_command( | |
'Inv', | |
function(opts) | |
vim.cmd('new') | |
vim.cmd('term inv ' .. opts.args) | |
vim.cmd('startinsert') | |
end, | |
{ | |
nargs = "*", -- Allow optional arguments | |
desc = "Run 'inv' with the specified arguments in a new terminal", | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment