Neovim plugin that parses keymaps from a markdown README and displays them in a floating window with syntax highlighting.
Using lazy.nvim:
{
'vsyaco/keymaps-help.nvim',
opts = {},
}Default options:
{
show_on_startup = true, -- show keymaps window on VimEnter
keys = { '?', '<C-/>' }, -- toggle keybindings
readme_path = vim.fn.stdpath('config') .. '/README.md', -- path to README with keymaps
}The plugin looks for a ## Keymaps (or ## Key Mappings) section in your README. Under it, use ### subsections with markdown tables:
## Keymaps
### General
| Key | Action | Mode |
|-----|--------|------|
| `<leader>w` | Save file | n |
| `jk` | Exit insert mode | i |
### Navigation
| Key | Action | Mode |
|-----|--------|------|
| `<C-h>` | Move to left window | n |Each table row must have three columns: Key (in backticks), Action, and Mode.
- Press
?or<C-/>to toggle the keymaps window - Press
qorEscto close