Currently for calling a :Command during installation of a plugin you need to call a function:
{ 'nvim-treesitter/nvim-treesitter', run = function() vim.cmd 'TSUpdate' end },
This is very convoluted and long way to do a very simple thing, that I argue is the most common post installation tactic taken by plugins.
My solution
Having some sort of check on the first letter of the string is passed to run. If : call vim.cmd else call shellscript. This wouldn't substitute giving a function to run but will be a life and usability improvement.
A idea for using the check would be:
test = "Hello World"
print(test:sub(1,1))
- returns -------------
H
Currently for calling a
:Command
during installation of a plugin you need to call a function:This is very convoluted and long way to do a very simple thing, that I argue is the most common post installation tactic taken by plugins.
My solution
Having some sort of check on the first letter of the string is passed to
run
. If:
callvim.cmd
else call shellscript. This wouldn't substitute giving a function torun
but will be a life and usability improvement.A idea for using the check would be: