Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesmithgh committed Nov 4, 2023
1 parent 15aec06 commit 3d5da40
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ Navigate your Kitty scrollback buffer to quickly search, copy, and execute comma
> v2.0.0 has breaking changes and requires steps to properly migrate from v1.X.X.
>
> You can ignore this section if you have not previously installed any version of kitty-scrollback.nvim

 
<details>
<summary>Migration Steps</summary>

Expand All @@ -40,28 +39,28 @@ Navigate your Kitty scrollback buffer to quickly search, copy, and execute comma

<!-- panvimdoc-ignore-end -->

- If you are using the <a href="https://github.com/folke/lazy.nvim">lazy.nvim</a> or <a href="https://github.com/wbthomason/packer.nvim">packer.nvim</a> package manager, then
add the custom `User` event `KittyScrollbackLaunch` as a trigger for lazy loading. See [Installation](#-installation) for additional details.
- If you are using the <a href="https://github.com/folke/lazy.nvim">lazy.nvim</a> or <a href="https://github.com/wbthomason/packer.nvim">packer.nvim</a> package manager, then
add the custom `User` event `KittyScrollbackLaunch` as a trigger for lazy loading. See [Installation](#-installation) for additional details.

```lua
event = { 'User KittyScrollbackLaunch' }
```

- Regenerate default Kitten mappings and add to `kitty.conf`
- Regenerate default Kitten mappings and add to `kitty.conf`

```sh
nvim --headless +'KittyScrollbackGenerateKittens' +'set nonumber' +'set norelativenumber' +'%print' +'quit!' 2>&1
```
- Remove previous kitty-scrollback.nvim Kitten mappings in `kitty.conf`
- Remove previous kitty-scrollback.nvim Kitten mappings in `kitty.conf`

- The default mapping keys changed from `ctrl+shift` to `kitty_mod`. The default values for `kitty_mod` in Kitty is `ctrl+shift`.
- If you are using the default value for `kitty_mod` of `ctrl+shift`, then no change is needed.
- If you are using a different value for `kitty_mod`, then you should correct any potential mapping conflicts that may occur
now that `kitty-scrollback.nvim` is using `kitty_mod`.
- The default mapping keys changed from `ctrl+shift` to `kitty_mod`. The default values for `kitty_mod` in Kitty is `ctrl+shift`.
- If you are using the default value for `kitty_mod` of `ctrl+shift`, then no change is needed.
- If you are using a different value for `kitty_mod`, then you should correct any potential mapping conflicts that may occur
now that `kitty-scrollback.nvim` is using `kitty_mod`.

- Migrate any customized configurations to the new format
- When you define your kitty-scrollback.nvim Kitten configuration, do not use `--config-file` `yourconfigfile.lua`. Instead,
move the contents of `yourconfigfile.lua` to an entry in the configuration passed to the kitty-scrollback.nvim setup function.
- Migrate any customized configurations to the new format
- When you define your kitty-scrollback.nvim Kitten configuration, do not use `--config-file` `yourconfigfile.lua`. Instead,
move the contents of `yourconfigfile.lua` to an entry in the configuration passed to the kitty-scrollback.nvim setup function.
```lua
require('kitty-scrollback').setup({
Expand All @@ -71,8 +70,8 @@ end,
})
```

Update your Kitten to use the name of the configuration defined in the setup function. In this example,
`--config-file yourconfigfile.lua` changes to `--config yourconfig`
Update your Kitten to use the name of the configuration defined in the setup function. In this example,
`--config-file yourconfigfile.lua` changes to `--config yourconfig`

<details>
<summary>Real example</summary>
Expand All @@ -81,8 +80,8 @@ end,
> The configuration to view the last command output now references a builtin configuration instead of a file. The
> new configuration can be viewed by running `:KittyScrollbackGenerateKittens`.
- Old configuration
- The Kitten defined in `kitty.conf` references the configuration file `get_text_last_cmd_output.lua`
- Old configuration
- The Kitten defined in `kitty.conf` references the configuration file `get_text_last_cmd_output.lua`

```kitty
# Browse output of the last shell command in nvim
Expand All @@ -104,8 +103,8 @@ end
return M
```

- New configuration
- The Kitten defined in `kitty.conf` references the builtin configuration name `ksb_builtin_last_cmd_output`
- New configuration
- The Kitten defined in `kitty.conf` references the builtin configuration name `ksb_builtin_last_cmd_output`

```kitty
# Browse output of the last shell command in nvim
Expand Down

0 comments on commit 3d5da40

Please sign in to comment.