feat: add GoTagClear command
This commit is contained in:
parent
ac27f4b679
commit
f97eca8e22
3 changed files with 13 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ local cmd = require "gopher._utils.commands"
|
|||
API.install_deps = require "gopher.installer"
|
||||
API.tags_add = tags.add
|
||||
API.tags_rm = tags.remove
|
||||
API.tags_clear = tags.clear
|
||||
API.impl = require "gopher.impl"
|
||||
API.iferr = require "gopher.iferr"
|
||||
API.comment = require "gopher.comment"
|
||||
|
|
|
|||
|
|
@ -116,4 +116,15 @@ function M.remove(...)
|
|||
modify(unpack(cmd_args))
|
||||
end
|
||||
|
||||
---clear all tags to struct under cursor
|
||||
function M.clear()
|
||||
if #arg == nil or arg == "" then
|
||||
arg = { "json" }
|
||||
end
|
||||
|
||||
local cmd_args = { "-clear-tags" }
|
||||
|
||||
modify(unpack(cmd_args))
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
command! -nargs=* GoTagAdd :lua require"gopher.api".tags_add(<f-args>)
|
||||
command! -nargs=* GoTagRm :lua require"gopher.api".tags_rm(<f-args>)
|
||||
command! -nargs=0 GoTagClear :lua require"gopher.api".tags_clear()
|
||||
command! -nargs=* GoTestAdd :lua require"gopher.api".test_add(<f-args>)
|
||||
command! -nargs=* GoTestsAll :lua require"gopher.api".tests_all(<f-args>)
|
||||
command! -nargs=* GoTestsExp :lua require"gopher.api".test_exported(<f-args>)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue