Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tamton-aquib/keys.nvim
A screen keys plugin for neovim.
https://github.com/tamton-aquib/keys.nvim
hacktoberfest lua neovim neovim-plugin nvim
Last synced: 5 days ago
JSON representation
A screen keys plugin for neovim.
- Host: GitHub
- URL: https://github.com/tamton-aquib/keys.nvim
- Owner: tamton-aquib
- License: mit
- Created: 2022-05-04T12:16:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-17T08:52:54.000Z (7 months ago)
- Last Synced: 2024-08-01T16:44:29.049Z (3 months ago)
- Topics: hacktoberfest, lua, neovim, neovim-plugin, nvim
- Language: Lua
- Homepage:
- Size: 8.79 KB
- Stars: 92
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# keys.nvim
A neovim plugin that shows keystrokes.
Kind of like screen keys but inside neovim.
WIP, contains bugs.> [!TIP]
> A better implementation of this plugin can be found at [screenkey.nvim](https://github.com/NStefan002/screenkey.nvim) by @NStefan002![keys nvim](https://user-images.githubusercontent.com/77913442/166695082-93e0873a-3d14-4a90-911e-fa05de670078.gif)
### Installation
```lua
use { 'tamton-aquib/keys.nvim' }
```
> Use `cmd="KeysToggle"` for lazy-loading.### Configuration
- Default setup function:
```lua
require("keys").setup {
enable_on_startup = false,
win_opts = {
width = 25
-- etc
},
-- TODO: more options later
}
```### Usage
- `KeysToggle` command.
- `require("keys").toggle()`#### Statusline component
This plugin exposes `current_keys()` function.
To use it in statusline, set the provider as:
```lua
require("keys").current_keys(true)
-- `true` implies return it as a string rather than a table
```
> ❗ Make sure to set `enable_on_startup = true` inside setup()### TODO:
- [ ] Crtl and other modifier keys (maybe?).
- [ ] Backspace and some other basic ones.
- [ ] Cleanup.
- [ ] fix on_key() clear_namespace bug.### Notes to myself
- autocmd ModeChanged
- getchar() or getcharmod()