- Lua 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| examples | ||
| lua/kirdow-help | ||
| LICENSE | ||
| README.md | ||
KirdowHelp.nvim
Simple help menu for NeoVim configs by Kirdow.
Requirements
NeoVim 0.7 or newer. Targets 0.12.
Installation
lazy.nvim:
'https://git.ktnuity.com/kirdow/kirdowhelp.nvim'
Packer:
use 'https://git.ktnuity.com/kirdow/kirdowhelp.nvim'
vim-plug:
Plug 'https://git.ktnuity.com/kirdow/kirdowhelp.nvim'
Usage
First check Configuration.
By default use this keymap:
<leader><F1>
This will open a reconfigurable readme file in a readonly buffer.
Configuration
Call setup to set up the configuration, as well as creating the keymap. All options are optional, although changing readme_path is strongly recommended.
require("kirdow-help").setup({
-- `readme_path` is the path to the readme text file to open in the buffer. Changing this is highly recommended. By default it opens an example/demo readme.
readme_path = "/path/to/readme.txt",
-- `keymap` is the keymap to use to open the readme buffer. Change this to whatever you want it set to. Setting this to `false` will disable the bind, but the API still works.
keymap = "<leader><F1>",
})
That's all the configuration needed.
API
Some public facing functions exist would you like to use them in a different way.
is_shown:
require("kirdow-help").is_shown()
Returns true if the readme is currently visible.
show:
require("kirdow-help").show()
Opens the readme file in the readonly buffer. This is what the default bind calls if used. This will replace any existing readme buffer open if they exist.
set_config_readme:
require("kirdow-help").set_config_readme(path)
Used to programmatically set the path to the readme that will be used to open the buffer. See readme_path in Configuration for more information regarding this value. It can be set to nil which in turn will disable the menu from opening. It does not however disable the keymap if already setup.
License
KirdowHelp is released and the source is made available under MIT License.