From 4576b0a27bdc43441028b4bd828d1a7adca1b90a Mon Sep 17 00:00:00 2001 From: Mike Smith <10135646+mikesmithgh@users.noreply.github.com> Date: Tue, 31 Oct 2023 21:22:11 -0400 Subject: [PATCH] chore: docs for gen command update --- README.md | 8 ++++---- lua/kitty-scrollback/api.lua | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dfd22e47..85280ef4 100644 --- a/README.md +++ b/README.md @@ -290,10 +290,10 @@ use ASCII instead, set the option `status_window.style_simple` to `true`. ## 🫡 Commands and Lua API The API is available via the `kitty-scrollback.api` module. e.g., `require('kitty-scrollback.api')` -| Command | API | Description | -| :----------------------------------- | :------------------------------- | :---------------------------------------------------------------------- | -| `:KittyScrollbackGenerateKittens[!]` | `generate_kittens(boolean?)` | Generate Kitten commands used as reference for configuring `kitty.conf` | -| `:KittyScrollbackCheckHealth` | `checkhealth()` | Run `:checkhealth kitty-scrollback` in the context of Kitty | +| Command | API | Description | +| :---------------------------------------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------- | +| `:KittyScrollbackGenerateKittens[!] [generate_modes]` | `generate_kittens(boolean?, table)?` | Generate Kitten commands used as reference for configuring `kitty.conf` | +| `:KittyScrollbackCheckHealth` | `checkhealth()` | Run `:checkhealth kitty-scrollback` in the context of Kitty | ## ⌨️ Keymaps and Lua API The API is available via the `kitty-scrollback.api` module. e.g., `require('kitty-scrollback.api')` diff --git a/lua/kitty-scrollback/api.lua b/lua/kitty-scrollback/api.lua index 21dff148..4e365abc 100644 --- a/lua/kitty-scrollback/api.lua +++ b/lua/kitty-scrollback/api.lua @@ -68,6 +68,11 @@ M.toggle_footer = function() end end +---@alias KsbGenKittenModes string | 'maps' | 'commands' + +---Generate Kitten commands used as reference for configuring `kitty.conf` +---@param all boolean|nil +---@param generate_modes table|nil M.generate_kittens = function(all, generate_modes) generate_modes = (generate_modes and next(generate_modes)) and generate_modes or { 'maps' } local target_gen_modes = {}