remove duplicate code; Add LogPoint command (#200)

* fix: use strict test function name while debugging

* fix: use strict test function name while debugging

* Revert "fix: use strict test function name while debugging"

This reverts commit f47dd66c50.

* fix: GoPkgOutline, should reset pkg_info data before rerender

* remove duplicate code;
add GoLogPoint command

Co-authored-by: zhuyajie <930664@qq.com>
pull/201/head v0.2.0
Yajie Zhu 2 years ago committed by GitHub
parent c7a56c8615
commit f2e9666b50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,6 +14,13 @@ local dap_config = function()
end
dap.set_breakpoint(vfn.input('Breakpoint condition: '))
end)
create_cmd('LogPoint', function(_)
local dap = utils.load_plugin('nvim-dap', 'dap')
if not dap then
return
end
dap.set_breakpoint(nil,nil,vfn.input('Log message: '))
end)
create_cmd('ReplRun', function(_)
local dap = utils.load_plugin('nvim-dap', 'dap')
@ -88,44 +95,6 @@ local dap_config = function()
create_cmd('GoDbgKeys', function(_)
gdap.debug_keys()
end)
create_cmd('BreakCondition', function(_)
local dap = utils.load_plugin('nvim-dap', 'dap')
if not dap then
return
end
dap.set_breakpoint(vfn.input('Breakpoint condition: '))
end)
create_cmd('ReplRun', function(_)
local dap = utils.load_plugin('nvim-dap', 'dap')
if not dap then
return
end
dap.repl.run_last()
end)
create_cmd('ReplToggle', function(_)
local dap = utils.load_plugin('nvim-dap', 'dap')
if not dap then
return
end
dap.repl.toggle()
end)
create_cmd('ReplOpen', function(_)
local dap = utils.load_plugin('nvim-dap', 'dap')
if not dap then
return
end
dap.open()
vim.cmd('split')
end)
create_cmd('DapRerun', function(_)
local dap = utils.load_plugin('nvim-dap', 'dap')
if not dap then
return
end
dap.disconnect()
dap.close()
dap.run_last()
end)
create_cmd('DapUiFloat', function(_)
require('dapui').float_element()
end)

Loading…
Cancel
Save