Comments (8)
This looks similar to #2193. So that's your answer there.
If you would like to simply just hide the label from which-key
menu, you could do ["<leader>f] = which_key_ignore
. That doesn't mean that the keymaps are deleted. The top-level key will just not be visible on the menu. If you'd like to remove all the keys, there's no other way than manually deleting them.
If you'd like to change all the <leader>f
keys to something else, you can use the plugin that is mentioned in the other issue.
from lazyvim.
So I've already changed all the f keys one by one. It was a pain, yes, but it's possible so that's not my issue. The problem is that once which key shows everything goes real weird.
So I guess there is two asks/problems:
- My request is to disable or override the groups so that normal bindings show in which-key
- There is a bug where your mapping over an empty group will get wiped out.
Interestingly, I've found that you could utilize this to have fast and slow bindings. I didn't disable the maps for <leader>b{key}
but added my own mapping for <leader>b
. If I do the mapping within timeoutlen it uses my binding. If I let timeoutlen expire it pulls up whichkey and uses the group.
edit: I thought the issue on 2 was due to using noremap in the mapping but that was a red herring.
When the issue occurs (where my binding is removed) it is verified removed from the keymap, looking at nmap.
from lazyvim.
This is specific to which-key
, so I'd suggest creating an issue at the repo, since LazyVim has nothing to do with that.
Edit: regarding your second question, it might have to do with this open issue at the repo.
from lazyvim.
Sorry for the multiple edits. Yes and no. The problem is not with how which-key is generally used. It's only a problem because of the LazyVim which-key defaults. It's hardly a use case for which-key itself to handle someone creating an empty group on a particular mapping and then also creating a mapping on top. The answer would be to not create the empty group. I can't stop the creation of the empty group through the specs that LazyVim provides.
It's sorta related to the empty group thing and it sounds like what @folke was saying about it eating the leader key but in this case the mapping is gone entirely,
from lazyvim.
Again, this is very similar to #2193 (providing a mechanism to remove pre-configured groups) and the maintainer already gave an answer there (about a configurable single source of keys). My guess is your request falls under the same assumptions as in that issue. I'm just a regular user without a say in the project, so maybe the maintainer has a different opinion on this.
Either way, what I can suggest you is to either use which_key_ignore
to hide the specific key you want from the which-key
top-level menu (but that won't delete the keymaps and they will still be available) or delete all the keymaps you want and change the which-key
defaults to whatever you like.
Edit: You could also take a look into mini.clues and configure that from the start to show exactly what you'd like and disable which-key
.
from lazyvim.
Yeah I think disabling which-key or, perhaps, just mapping the which-key leader key to something else will solve my problem. I think it is a more serious issue that the mappings are changing/disappearing due to the way groups work with which-key though.
from lazyvim.
That is an issue directed to the which-key repo though, since its codebase is responsible for how to interact with groups. Lazyvim just uses it to define groups and map keys.
from lazyvim.
Alright I'll create an issue there.
from lazyvim.
Related Issues (20)
- bug: extra(rust) keymaps not working HOT 3
- bug: keymap sequence issue HOT 8
- bug: duplicate lsp symbol navigation for lualine HOT 7
- bug: Error executing vim.schedule lua callback: vim/keymap.lua:0: E31: No such mapping HOT 1
- bug:Prettier not working again. HOT 16
- bug: The plugin `lazyvim.plugins.extras.lang.sql` doesn't work for new implementations HOT 4
- bug: LazyGit does not inherit colorscheme
- bug:
- bug: angular treesitter not enabled for telescope previews HOT 2
- bug: neotest rustacean does not work with `lazyvim.plugins.extras.test.core` HOT 1
- bug: snippet result is displayed twice with LuaSnip extra
- bug: cannot use `<C-j>` and `<C-k>` in fzf-lua to navigate the results HOT 17
- feature: add mason-tool-installer for auto updating packages HOT 5
- bug: Attempt to index field 'foldupdate_range' (a nil value) HOT 1
- bug: codelldb does not find localhost because it resolves to ipv6 address HOT 1
- bug: fzflua opens file inside picker window HOT 5
- bug: clearjumps on VimEnter doesn't take affect
- bug: Searching Workspace symbols dont work with fzf-lua extra
- bug: fzf & noice history
- bug: yanky plugin error HOT 2
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 lazyvim.