Skip to content

Commit

Permalink
prefer bang instead of new command
Browse files Browse the repository at this point in the history
  • Loading branch information
igorlfs committed Feb 12, 2025
1 parent bc111dc commit c13d296
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plugin/dap-view.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
local command = vim.api.nvim_create_user_command

command("DapViewOpen", require("dap-view").open, {})
command("DapViewClose", require("dap-view").close, {})
command("DapViewHide", require("dap-view").hide, {})
command("DapViewClose", function(opts)
if opts.bang then
require("dap-view").hide()
else
require("dap-view").close()
end
end, { bang = true })
command("DapViewToggle", require("dap-view").toggle, {})
command("DapViewWatch", require("dap-view").add_expr, {})

0 comments on commit c13d296

Please sign in to comment.