From cd3ac0c6f8881bab6de66117cbe5d23ca4a014e6 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 22 Mar 2021 22:10:39 -0400 Subject: nvim dap --- vimscript/functions.vim | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'vimscript/functions.vim') diff --git a/vimscript/functions.vim b/vimscript/functions.vim index 9a468f45..56c4526c 100644 --- a/vimscript/functions.vim +++ b/vimscript/functions.vim @@ -25,3 +25,36 @@ command! PreviewHunk lua require 'nv-utils'.preview_hunk() command! BlameLine lua require 'nv-utils'.blame_line() command! W noa w +" Debugging +command! DebugToggleBreakpoint lua require'dap'.toggle_breakpoint() +command! DebugStart lua require'dap'.continue() +command! DebugContinue lua require'dap'.continue() +command! DebugStepOver lua require'dap'.step_over() +command! DebugStepOut lua require'dap'.step_out() +command! DebugStepInto lua require'dap'.step_into() +command! DebugToggleRepl lua require'dap'.repl.toggle() +command! DebugGetSession lua require'dap'.session() + +" Available Debug Adapters: +" https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/ +" +" Adapter configuration and installation instructions: +" https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation +" +" Debug Adapter protocol: +" https://microsoft.github.io/debug-adapter-protocol/ + +" TODO Add full support later +" nnoremap :lua require'dap'.continue() +" nnoremap :lua require'dap'.step_over() +" nnoremap :lua require'dap'.step_into() +" nnoremap :lua require'dap'.step_out() +" nnoremap b :lua require'dap'.toggle_breakpoint() +" nnoremap B :lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: ')) +" nnoremap lp :lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) +" nnoremap dr :lua require'dap'.repl.open() +" nnoremap dl :lua require'dap'.run_last() + +" TODO find out why this thing follows me everywhere in java +let blacklist = ['java'] +autocmd CursorHold,CursorHoldI * if index(blacklist, &ft) < 0 | lua require'nvim-lightbulb'.update_lightbulb() -- cgit v1.2.3