Skip to content

Commit 27a34ad

Browse files
chore: add type annotation to setup (#364)
Co-authored-by: Mike Smith <10135646+mikesmithgh@users.noreply.github.com>
1 parent ecb752f commit 27a34ad

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

lua/kitty-scrollback/configs/builtin.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---@type table<string, KsbOpts|fun(KsbKittyData):KsbOpts>
1+
---@type table<string, KsbOpts|fun(KsbKittyData):KsbOpts?>
22
return {
33
ksb_builtin_get_text_all = {
44
kitty_get_text = {

lua/kitty-scrollback/configs/defaults.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
---@field extent string|nil | 'screen' | 'all' | 'selection' | 'first_cmd_output_on_screen' | 'last_cmd_output' | 'last_visited_cmd_output' | 'last_non_empty_output' What text to get. The default of screen means all text currently on the screen. all means all the screen+scrollback and selection means the currently selected text. first_cmd_output_on_screen means the output of the first command that was run in the window on screen. last_cmd_output means the output of the last command that was run in the window. last_visited_cmd_output means the first command output below the last scrolled position via scroll_to_prompt. last_non_empty_output is the output from the last command run in the window that had some non empty output. The last four require shell_integration to be enabled. Choices: screen, all, first_cmd_output_on_screen, last_cmd_output, last_non_empty_output, last_visited_cmd_output, selection
2020

2121
---@class KsbStatusWindowIcons
22-
---@field kitty string kitty status window icon, defaults to 󰄛
23-
---@field heart string heart status window icon, defaults to 󰣐
24-
---@field nvim string nvim status window icon, defaults to
22+
---@field kitty? string kitty status window icon, defaults to 󰄛
23+
---@field heart? string heart status window icon, defaults to 󰣐
24+
---@field nvim? string nvim status window icon, defaults to
2525

2626
---@class KsbStatusWindowOpts
27-
---@field enabled boolean If true, show status window in upper right corner of the screen
28-
---@field style_simple boolean If true, use plaintext instead of nerd font icons
29-
---@field autoclose boolean If true, close the status window after kitty-scrollback.nvim is ready
30-
---@field show_timer boolean If true, show a timer in the status window while kitty-scrollback.nvim is loading
31-
---@field icons KsbStatusWindowIcons Icons displayed in the status window, defaults to 󰄛 󰣐 
27+
---@field enabled? boolean If true, show status window in upper right corner of the screen
28+
---@field style_simple? boolean If true, use plaintext instead of nerd font icons
29+
---@field autoclose? boolean If true, close the status window after kitty-scrollback.nvim is ready
30+
---@field show_timer? boolean If true, show a timer in the status window while kitty-scrollback.nvim is loading
31+
---@field icons? KsbStatusWindowIcons Icons displayed in the status window, defaults to 󰄛 󰣐 
3232

3333
---@alias BoolOrFn boolean|fun():boolean
3434
---@alias KsbWinOpts table<string, any>

lua/kitty-scrollback/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---@mod kitty-scrollback
22
local M = {}
33

4-
---@type table<string, KsbOpts|fun(KsbKittyData):KsbOpts>
4+
---@type table<string, KsbOpts|fun(KsbKittyData):KsbOpts?>
55
M.configs = {}
66

7-
---Create commands for generating kitty-scrollback.nvim kitten configs
7+
---@param configs? table<string, KsbOpts|fun(KsbKittyData):KsbOpts?>
88
M.setup = function(configs)
99
if configs then
1010
M.configs = configs

0 commit comments

Comments
 (0)