feat(api): implement nvim_{add,del}_user_command

Add support for adding and removing custom user commands with the Nvim
API.
This commit is contained in:
Gregory Anders
2021-12-22 11:40:21 -07:00
parent 9804a2870f
commit eff11b3c3f
17 changed files with 740 additions and 99 deletions

View File

@@ -441,8 +441,8 @@ local function process_function(fn)
local cparam = string.format('arg%u', j)
local param_type = real_type(param[1])
local lc_param_type = real_type(param[1]):lower()
local extra = ((param_type == "Object" or param_type == "Dictionary") and "false, ") or ""
if param[1] == "DictionaryOf(LuaRef)" then
local extra = param_type == "Dictionary" and "false, " or ""
if param[1] == "Object" or param[1] == "DictionaryOf(LuaRef)" then
extra = "true, "
end
local errshift = 0