Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
saccarosium opened this issue Mar 28, 2023 · 0 comments · Fixed by #145
Closed

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

saccarosium opened this issue Mar 28, 2023 · 0 comments · Fixed by #145
Labels
enhancement New feature or request

Comments

@saccarosium
Copy link
Collaborator

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants