diff --git a/plugin/dap-view.lua b/plugin/dap-view.lua index 38f75af..bffa51d 100644 --- a/plugin/dap-view.lua +++ b/plugin/dap-view.lua @@ -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, {})