fix: add nargs

master
Hung 2023-06-02 20:09:26 -07:00
parent 60c3237a24
commit 2a0a1629d5
1 changed files with 3 additions and 3 deletions

View File

@ -226,11 +226,11 @@ function M.setup(config)
M.config = vim.tbl_deep_extend("force", M.config, config or M.config_default) M.config = vim.tbl_deep_extend("force", M.config, config or M.config_default)
M.config.nvim_ns = vim.api.nvim_create_namespace("tsql") M.config.nvim_ns = vim.api.nvim_create_namespace("tsql")
vim.api.nvim_create_user_command("Noh", function() M.clear_highlights() end, vim.api.nvim_create_user_command("Noh", function(_) M.clear_highlights() end,
{ nargs = "0", desc = "Clear tsql highlights" }) { nargs = 0, desc = "Clear tsql highlights" })
vim.api.nvim_create_user_command("Tdsl", function(cmd) vim.api.nvim_create_user_command("Tdsl", function(cmd)
M.s(cmd.args):do_nvim(M.store) M.s(cmd.args):do_nvim(M.store)
end, { nargs = "*", desc = "tsql DSL invocation" }) end, { nargs = "?", desc = "tsql DSL invocation" })
M.store = M.Store:new() M.store = M.Store:new()
end end