Comments (5)
We default to silent=true
, but you don;t want that for this keybinding, so set it to false.
i = {":GrepperGit<space>", "Search for something in Git files", silent=false}
from which-key.nvim.
Under the hood, we're just calling vim.api.nvim_set_keymap
to set up the keymaps. Not sure what the exact syntax should be for this.
from which-key.nvim.
:call nvim_set_keymap('n', '<leader>oo', ':GrepperRg ', {})
works, so this is a problem of which-key it seems
from which-key.nvim.
Makes sense, works!
from which-key.nvim.
I've had a related issue for soooo long and I can't believe I didn't think about this before.
I had my own helper map
function that also defaults silent = true
, and that made it so that any mappings I made with it or with register
never updated the command line until I made some other edit. I had been suffering under this for weeks.
And to think it was just a matter of adding silent = false
to those mappings. 🤦
I'm only commenting here in case someone else made this mistake and to help others if they are searching for this issue.
I had bindings like this:
-- Type "%%" in command line to quickly insert current filename.
-- E.g.
-- :!mv %% $$new_name.txt
-- becomes
-- :!mv path/to/file.txt path/to/new_name.txt
--
map("c", "%%", "<C-R>=expand('%')<cr>", { silent = false }) -- Full path
map("c", "$$", "<C-R>=expand('%:h').'/'<cr>", { silent = false }) -- Dirname
map("c", "^^", "<C-R>=expand('%:t')<cr>", { silent = false }) -- Basename
-- Hide from which key
wk.register({
["%%"] = "which_key_ignore",
["$$"] = "which_key_ignore",
["^^"] = "which_key_ignore",
}, {
mode = "c",
})
Thank you, everyone!
(Sorry for the notification spam, though.)
from which-key.nvim.
Related Issues (20)
- bug: Mapping a function, concatenates the compile commandd with the result.
- feature: Disable which-key UI HOT 2
- feature: Configuration option to override the usage of timeoutlen
- feature: Group descriptions
- bug: Command mode prompt doesn't show until user types, when mapping opens command mode HOT 2
- feature: Add keymap statistic.
- bug: which-key errors out when pressing wrong key combo in Command Line buffer mode HOT 4
- bug: module 'which-key' not found (Lazy.nvim) after registering maps
- feature: Peek buffers like registers
- feature: Make menu items clickable
- bug: vim.on_key binded function always receive <80><fd>* characters when which-key setup.
- bug: can't disable plugins.presets.z
- feature: Manual trigger of which-key HOT 2
- bug: Mapping vim.cmd functions with arguments will run the function when nvim starts HOT 2
- feature: Ability to highlight letters inside the description
- bug/feature: partial mapping (aliases) don't work as expected HOT 2
- bug: with OSC-52 enabled, which-key doesn't work correctly with registers
- bug: statusline goes away when `cmdheight=0` and `laststatus=3` on latest 0.10 nightly
- bug: Crash on VimEnter when using `mapleader = "<C-Space>"` and setting a mapping with `<C-Space>` instead of `<Leader>` (or defining a group) HOT 1
- bug: cmdheight=0 causes inconsistent behavior between `:` and `;` with whichkey mapping
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from which-key.nvim.