From 47be6a508c4150f8ef2627ae185c650c081c6bbf Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sat, 4 Jun 2022 19:17:01 +0800 Subject: Add more plugins for nvim --- .vim/after/plugin/dap.vim | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .vim/after/plugin/dap.vim (limited to '.vim/after/plugin/dap.vim') diff --git a/.vim/after/plugin/dap.vim b/.vim/after/plugin/dap.vim new file mode 100644 index 0000000..d452fce --- /dev/null +++ b/.vim/after/plugin/dap.vim @@ -0,0 +1,46 @@ +finish + +packadd nvim-dap +packadd nvim-dap-ui +packadd nvim-dap-go + +lua <b', dap.toggle_breakpoint) +vim.keymap.set('n', 'B', dap.list_breakpoints) +vim.keymap.set('n', 'c', dap.continue) +vim.keymap.set('n', 'n', dap.step_over) +vim.keymap.set('n', 'si', dap.step_into) +vim.keymap.set('n', 'so', dap.step_out) +vim.keymap.set('n', 'rl', dap.run_last) +vim.keymap.set('n', 'ut', dap.run_to_cursor) +vim.keymap.set('n', 'su', dap.up) +vim.keymap.set('n', 'sd', dap.down) +vim.keymap.set('n', 'K', widgets.hover) + +float_scopes = function () + widgets.centered_float(widgets.scopes) +end + +float_frames = function () + widgets.centered_float(widgets.frames) +end + +float_threads = function () + widgets.centered_float(widgets.threads) +end + +vim.keymap.set('n', 's', float_scopes) +vim.keymap.set('n', 'f', float_frames) +vim.keymap.set('n', 't', float_threads) +vim.keymap.set('n', 'r', dap.repl.toggle) + +dap_go.setup() + +EOF + -- cgit v1.2.3