From a34d1160b4af84ca6de5e31e2c044a4feebb20d3 Mon Sep 17 00:00:00 2001 From: Joshua Date: Fri, 31 Oct 2025 09:15:28 -0500 Subject: [PATCH] docs(readme): add usage example for enabling text wrapping in scrollback buffer --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index a4d36969..30a10bce 100644 --- a/README.md +++ b/README.md @@ -656,6 +656,24 @@ The configuration precedence is `default` > `global` > `builtin` > `user` where } ``` +#### Enabling Text Wrapping + +To enable text wrapping in the scrollback buffer, you can use the `after_launch` callback to set the `wrap` option: + +```lua +require('kitty-scrollback').setup({ + { + callbacks = { + after_launch = function(kitty_data, opts) + vim.o.wrap = true + end, + }, + }, +}) +``` + +This configuration enables text wrapping for the entire scrollback buffer, making long lines wrap to fit within the window width. The `after_launch` callback is executed after the scrollback buffer has been loaded but before the cursor is positioned, making it an ideal place to set buffer-specific options like text wrapping. + ### Nerd Fonts By default, `kitty-scrollback.nvim` uses [Nerd Fonts](https://www.nerdfonts.com) in the status window. If you would like to