You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can I configure (buffer-local) keymaps for each of the DAP UI elements?
For instance, I would like to map <CR> to the open action for the "DAP Stacks" element. The current behavior of <CR> in this stack frame widget is just a warning message: "No expand action for current line". It would be more intuitive (as a default behavior or for customization) to have <CR> mapped to some action, or re-mapped to o.
Also, users may want to have a lot of custom key mappings. When it comes to dap-repl, it is possible by making a FileType autocmd event as follows:
vim.api.nvim_create_autocmd("FileType", {
pattern="dap-repl",
group=... , -- some augroupcallback=function()
-- Example: Map CTRL-L to clear the clear REPLvim.keymap.set('i', '<c-l>', function() dap.repl.clear() end, { buffer=true, desc='Clear REPL' })
-- and more...end,
})
However this does NOT work for dapui_xxx elements. Custom keymaps mapped for filetypes dapui_stacks, dapui_watches, etc. will be lost as dapui would try to reassign the buf-local keymaps during an execution of dapui.render.canvas.render_buffer() when the content changes.
The text was updated successfully, but these errors were encountered:
Can I configure (buffer-local) keymaps for each of the DAP UI elements?
For instance, I would like to map
<CR>
to theopen
action for the "DAP Stacks" element. The current behavior of<CR>
in this stack frame widget is just a warning message: "No expand action for current line". It would be more intuitive (as a default behavior or for customization) to have<CR>
mapped to some action, or re-mapped too
.Also, users may want to have a lot of custom key mappings. When it comes to dap-repl, it is possible by making a
FileType
autocmd event as follows:However this does NOT work for dapui_xxx elements. Custom keymaps mapped for filetypes
dapui_stacks
,dapui_watches
, etc. will be lost as dapui would try to reassign the buf-local keymaps during an execution ofdapui.render.canvas.render_buffer()
when the content changes.The text was updated successfully, but these errors were encountered: