Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,8 @@ The configuration precedence is `default` > `global` > `builtin` > `user` where
checkhealth = false,
-- string? Sets the mode for coloring the Visual highlight group in the scrollback buffer window. darken uses a darkened version of the Normal highlight group to improve readability. kitty uses the colors defined for selection_foreground and selection_background in your Kitty configuration. nvim uses the default colors defined in the Visual highlight group. reverse reverses the foreground and background colors of the visual selection.
visual_selection_highlight_mode = 'darken',
-- integer? Temporary column width during get-text operation to avoid hard wrapping (larger values may impact performance), see :h columns
scrollback_columns = 300,
}
```

Expand Down
2 changes: 2 additions & 0 deletions lua/kitty-scrollback/configs/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
---@field kitty_get_text KsbKittyGetText|nil options passed to get-text when reading scrollback buffer, see `kitty @ get-text --help`
---@field checkhealth boolean|nil if true execute :checkhealth kitty-scrollback and skip setup
---@field visual_selection_highlight_mode string | 'darken' | 'kitty' | 'nvim' | 'reverse' | nil
---@field scrollback_columns integer|nil temporary column width during get-text operation to avoid hard wrapping (larger values may impact performance), see :h columns
local default_opts = {
callbacks = nil,
keymaps_enabled = true,
Expand Down Expand Up @@ -90,6 +91,7 @@ local default_opts = {
},
checkhealth = false,
visual_selection_highlight_mode = 'darken',
scrollback_columns = 300,
}

return default_opts
2 changes: 1 addition & 1 deletion lua/kitty-scrollback/kitty_commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ M.get_text_term = function(get_text_opts, on_exit_cb)
-- current window size. Note: a larger min_cols appears to impact performance
-- defer is used as a timing workaround because this is expected to be called right before
-- opening the terminal
p.orig_columns = defer_resize_term(300)
p.orig_columns = defer_resize_term(opts.scrollback_columns)

-- set the shell used to sh to avoid imcompatabiliies with other shells (e.g., nushell, fish, etc)
vim.o.shell = 'sh'
Expand Down