savq / paq-nvim

🌚 Neovim package manager
MIT License
653 stars 39 forks source link

[Feature Discussion] shorten way to call a `:Command` on `run` #142

Closed saccarosium closed 1 year ago

saccarosium commented 1 year ago

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