-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Hello everyone,
there's a sentence in the README that describes that foreign_keys and exit configuration options actually overwrite the behavior specified by a color. At least I could not get it working.
What is my problem?
I want to create a DAP hydra that has the policy of an amaranth hydra. However, since DAP stepping/continuing is asynchronous, I have to use a pink hydra. When using a pink hydra and specifying { foreign_keys = 'warn', exit = true }, the behavior of the hydra does not change, i.e. it still processes inputs that are not mapped to a head.
What would solve my problem?
- option 1: I can create a pink hydra and specify
foreign_keysandexitand the configuration actually changes the behavior of the hydra - option 2: I can create a amaranth hydra that works with the asynchronous events of DAP (I tried the trick with
{ on_key = function() vim.wait(20) end, color = 'amaranth' }that is used in the proposed git hydra, however that does not work as expected with the DAP since when i usedap.continue()it actually pastes some text into the popup created bydap.continue()
Example code:
function cmd(command, suffix)
suffix = suffix or ''
return '<cmd>' .. command .. '<CR>' .. suffix
end
hydra({
name = 'Debugging',
config = { color = 'pink', foreign_keys = 'warn', exit = true },
hint = hints.dap,
mode = 'n',
body = '<Leader>d',
heads = {
{ 'b', cmd('DapToggleBreakpoint') },
{ 'c', cmd('DapContinue') },
{ 's', cmd('DapStepOver') },
{ 'i', cmd('DapStepInto') },
{ 'o', cmd('DapStepOut') },
{ 'r', cmd('DapToggleRepl') },
{ 'u', function() require('dapui').toggle({ reset = true }) end },
{ 'w', function() require('dapui').elements.watches.add() end },
{ '<Esc>', nil, { exit = true, nowait = true, desc = false }, },
},
})
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation