vim.api.nvim_get_keymap('n') does return a table with lnum (line number) , but not with the name of the script that set it (or path). I only know that verbose nmap .. does it, but prefer to avoid it (as needs to be called separately for each).

Any way in lua to obtain this?

  • Can you use maplist() or maparg() from Vim's API?
    – D. Ben Knoble
    Commented May 8 at 14:07
  • Ah,yes. I am on nvim, so no maplist (guess it is because of it). maparg has the same issue.
    – eyal karni
    Commented May 8 at 21:40

1 Answer 1


I think the simplest call might be :verbose nmap without specific mapping which I can run as it doesn't need to be called separately for each mapping.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.