Skip to content

Problems defining close keymap in neovim with lazy plugin manager #519

Open
@aleixq

Description

@aleixq

I am using neovim 0.9 and nvchad config which under the hood uses lazy plugin manager. Maybe I am using a fuzzy and strange environment setup, but for some reason I cannot remap any key to close event. I have this lazy plugin configuration set:

  {"vim-vdebug/vdebug",
  lazy = false,
  enabled = true,
  config = function()
    vim.api.nvim_echo({{'loading vdebug', 'none'}}, false, {})
    vim.cmd('let g:vdebug_keymap = { "run" : "<f5>","run_to_cursor" : "<f6>","step_over" : "<f7>","step_into" : "<f8>","step_out" : "<s-f8>", "close" : "<f4>", "detach" : "<f5>d", "set_breakpoint" : "<f10>", "get_context" : "<f10>x", "eval_under_cursor" : "<f10>c", "eval_visual" : "<f10>e" }')

AFAIK Everything works but the close button. So I have to call :python3 debugger.close() to exit debugger.

The keymaps are set because debugger status says that the stop key is F4:

▌▌ [<f5> Start] [<F4> Stop] [:help Vdebug]

and calling :let vdebug_keymap outs:

vdebug_keymap         {'run_to_cursor': '<f6>', 'get_context': '<f10>x', 'eval_visual': '<f10>e', 'step_into': '<f8>', 'eval_under_curso
r': '<f10>c', 'step_over': '<f7>', 'run': '<f5>', 'close': '<F4>', 'step_out': '<s-f8>', 'detach': '<f5>d', 'set_breakpoint': '<f10>'} 

The only way to make it work is adding this vim cmd instruction at the end of the lazy plugin config function:

vim.cmd(":noremap <F4> :python3 debugger.close()<cr>")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions