Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afreakk/unimpaired-which-key.nvim
Bridge between vim-unimpaired and which-key.nvim
https://github.com/afreakk/unimpaired-which-key.nvim
lua neovim neovim-lua neovim-plugin
Last synced: 3 months ago
JSON representation
Bridge between vim-unimpaired and which-key.nvim
- Host: GitHub
- URL: https://github.com/afreakk/unimpaired-which-key.nvim
- Owner: afreakk
- Created: 2023-02-12T11:52:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-16T10:56:02.000Z (6 months ago)
- Last Synced: 2024-08-16T12:10:50.411Z (6 months ago)
- Topics: lua, neovim, neovim-lua, neovim-plugin
- Language: Lua
- Homepage:
- Size: 9.77 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# unimpaired-which-key.nvim
**unimpaired-which-key.nvim** is a bridge between [vim-unimpaired](https://github.com/tpope/vim-unimpaired/) and [which-key.nvim](https://github.com/folke/which-key.nvim)
## Features
- Which-key compatible tables with descriptions of the various vim-unimpaired mappings.
## Installation
Install the plugin with your preferred package manager, and set `tpope/vim-unimpaired` as a dependency like shown below:
#### [lazy.nvim](https://github.com/folke/lazy.nvim)
```lua
require("lazy").setup({
{ "afreakk/unimpaired-which-key.nvim"
, dependencies = { "tpope/vim-unimpaired" }
, config = function()
local wk = require("which-key")
wk.add(require("unimpaired-which-key"))
end
},
})
```Another options is using it as a dependency of which-key like this:
```lua
require("lazy").setup({
{ "folke/which-key.nvim"
, dependencies = { "afreakk/unimpaired-which-key.nvim" }
, config = function()
local wk = require("which-key")
wk.setup({
-- whatever options you got
})
wk.add(require("unimpaired-which-key"))
end
},
})
```If you prefer another method, no problem - this plugin is designed to simply provide you with helpful which-key compatible tables.
## Details
`unimpaired-which-key` gives you a table which can be passed to the `wk.add()` function, and that's all it does
## Caveat
Because (I think) vim-unimpaired binds using `` weird stuff, `vim.o.timeoutlen` has to expire, before you move on to submenus, like `yo`, `]o`, for those sub-menus to show in which-key.
The mappings will still work if you don't wait, but if you do `yo` before `vim.o.timeoutlen` has expired, you won't see any which-key menu. ¯\_(ツ)\_/¯Also, for some reason, if you lazy-load vim-unimpaired on `keys = { "[", "]", "y", "=", "", ">" }` for instance, vim-unimpaired doesn't work ¯\_(ツ)\_/¯
## Compatibility with `which-key` v2.xThis plugin has been updated to leverage the new APIs added in `which-key` v3. For compatibility with older versions of `which-key`, pin this plugin to the `v0.1` tag.