mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
Improved passing bang to functions
This commit is contained in:
parent
289e73b889
commit
303121e0ec
3 changed files with 98 additions and 92 deletions
|
|
@ -6,7 +6,7 @@ local M = {}
|
|||
|
||||
function M.setup_commands(mod, commands)
|
||||
for command_name, def in pairs(commands) do
|
||||
local call_fn = string.format("lua require'nvim-treesitter.%s'.commands.%s.run('<bang>')(<f-args>)", mod, command_name)
|
||||
local call_fn = string.format("lua require'nvim-treesitter.%s'.commands.%s['run<bang>'](<f-args>)", mod, command_name)
|
||||
local parts = vim.tbl_flatten({
|
||||
"command!",
|
||||
def.args,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue