this post was submitted on 29 Jun 2023
6 points (100.0% liked)

Neovim

2 readers
1 users here now

founded 2 years ago
 

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?

top 4 comments
sorted by: hot top controversial new old
[–] stevearc@open-source.social 5 points 2 years ago (1 children)

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.social 1 points 2 years ago* (last edited 2 years ago) (1 children)

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 3 points 2 years ago (1 children)

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.

[–] normanras@open-source.social 2 points 2 years ago

Embarrassing... a little extra reading would have solved my issue. Thanks again, Steve!

load more comments
view more: next ›