From 059d8d5a2ca7c72eba66d937cef31894e128da45 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Tue, 21 Sep 2021 01:18:10 -0700 Subject: [PATCH] nvim: formatting and slight keymap adjustment --- .config/nvim/lua/lsp.lua | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua index 63036e3..7e334a1 100644 --- a/.config/nvim/lua/lsp.lua +++ b/.config/nvim/lua/lsp.lua @@ -124,7 +124,7 @@ M.cmp = function() [''] = cmp.mapping.close(), [''] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, - select = true, + select = false, }, [''] = function(fallback) if vim.fn.pumvisible() == 1 then @@ -229,19 +229,24 @@ end -- <<< -- DAP: Debug Adapter Protocol >>> M.dap = function() - -- default keybinds + -- keybinds vim.cmd [[ + " Debugger movement nnoremap d lua require'dap'.continue() - nnoremap dj lua require'dap'.step_over() - nnoremap dl lua require'dap'.step_into() - nnoremap dk lua require'dap'.step_out() - nnoremap dbb lua require'dap'.toggle_breakpoint() - nnoremap dbc lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition ')) - nnoremap dbl lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message ')) - nnoremap dp lua require'dap'.run_last() - nnoremap dr lua require'dap'.repl.open() + nnoremap dj lua require'dap'.step_over() + nnoremap dl lua require'dap'.step_into() + nnoremap dh lua require'dap'.step_out() + + " Breakpoints + nnoremap dbb lua require'dap'.toggle_breakpoint() + nnoremap dbc lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition ')) + nnoremap dbl lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message ')) + + " Extra + nnoremap dp lua require'dap'.run_last() + nnoremap dr lua require'dap'.repl.open() ]] - -- vim.fn.sign_define('DapBreakpoint', {text='🛑', texthl='', linehl='', numhl=''}) + -- vim.fn.sign_define('DapBreakpoint', {text='B', texthl='', linehl='', numhl=''}) -- custom attributes of breakpointed lines (use an emoji?) vim.cmd "au FileType dap-repl lua require('dap.ext.autocompl').attach()" -- per-language config: local dap = require('dap')