I’m trying to add a few more keymaps for some builtin telescope functions. Ironically, builtin.keymaps being one of them.

Which key shows my other telescope keymaps when I type <leader>f, but I want to figure out where they are defined. Is there a command in neovim to find where the keymaps are declared?

  • stevearc@open-source.social
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    You can see where your keymaps were set with :verbose map, or :verbose nmap for all your normal maps, or :verbose nmap <leader>f for all your normal maps that start with <leader>f. Note that if your keymap was set from lua you will only see “Last set from lua”. To get where in lua, you’ll need to start Neovim in verbose mode nvim -V1. See :help verbose-cmd for more information.

    • normanras@open-source.socialOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 year ago

      No way! Is this the same stevearc that made vim-arduino plugin? I was about to open an issue on the repo! But it might just be my setup of the lazy plugin manager.

      Anyway, thanks for the tip here! Since so much is setup with Lua the command just says “Last set by Lua”. I’ll have to dig around some more.

      • stevearc@open-source.social
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        Yep that’s me, issues welcome 🙂

        This is why I mentioned starting in verbose mode nvim -V1. If you do that you should see the exact line number where the keymap was set from lua.