https://github.com/gmatheu/keymap-stats.nvim
Neovim plugin to gather keymap usage and metrics... and hopefully get insights
https://github.com/gmatheu/keymap-stats.nvim
lua neovim neovim-plugin
Last synced: 2 months ago
JSON representation
Neovim plugin to gather keymap usage and metrics... and hopefully get insights
- Host: GitHub
- URL: https://github.com/gmatheu/keymap-stats.nvim
- Owner: gmatheu
- License: apache-2.0
- Created: 2024-05-09T15:51:47.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-10T15:31:49.000Z (12 months ago)
- Last Synced: 2025-04-10T16:50:50.252Z (12 months ago)
- Topics: lua, neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 66.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
keymap-stats.nvim
## Introduction
A Neovim plugin to understand the usage of configured keymaps.
The goal is to have a better understanding of the usage of keymaps:
- Which are more frequently used.
- What is the common way to access keymaps.
- Which are never used.
...
Hopefully with that information, Neovim mappings can be optimized in your own configuration.
## Features
- Keeps usage of keymaps execution
- Keeps usage of which-key's windows (optional)
- Keeps usage of hardtime's hints [wip] (optional)
- Keeps usage of Telescopes's mappings winow [future] (optional)
- Keeps usage of commands executed [future] (optional)
## Requirements
- Neovim >= [v0.7.0](https://github.com/neovim/neovim/releases/tag/v0.7.0)
## 📦 Installation
1. Install via your favorite package manager.
```lua
-- lazy.nvim
{
"gmatheu/keymap-stats.nvim",
opts = {}
},
```
2. Setup the plugin in your `init.lua`. This step is not needed with lazy.nvim if `opts` is set as above.
```lua
require("keymap-stats").setup()
```
## Usage
- `:KeymapStats report` Show a report of all-time keymaps usage
- `:KeymapStats stats` Show some statistics of current keymaps settings
## Configuration
You can pass your config table into the `setup()` function or `opts` if you use lazy.nvim.
If the option is a boolean, number, or array, your value will overwrite the default configuration.
### Options
| Option Name | Type | Default Valuae | Meaning |
| ----------- | ------- | -------------- | --------------------------------------------------------------- |
| `debug` | boolean | `false` | Debug mode (if enabled show notifications for multiple actions) |
| ... | ... | ... | ... |
## References
Most of the code is "inspired" by these projects:
- [hardtime.nvim](https://github.com/m4xshen/hardtime.nvim)
- [which-key.nvim](https://github.com/folke/which-key.nvim)
- [lazy.nvim](https://github.com/folke/lazy.nvim)
####
Other tools:
- [luacheck](https://luacheck.readthedocs.io/en/stable/index.html)