Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aleixq opened this issue Mar 10, 2023 · 0 comments
Open

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

aleixq opened this issue Mar 10, 2023 · 0 comments

Comments

@aleixq
Copy link
Contributor

aleixq commented Mar 10, 2023

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>")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant