feat: add option to completely disable paste window
When I press i in scrollback opens the window and moves my cursor there. Is that the paste window?
Hey, yes that is the paste window.
https://github.com/mikesmithgh/kitty-scrollback.nvim/issues/287#issuecomment-2543218762 provides details if you want to disable it.
Hey, yep there is a configuration option for that
-- boolean? If true, the yank_register copies content to the paste window. If false, disable yank to paste window yank_register_enabled = true,see https://github.com/mikesmithgh/kitty-scrollback.nvim?tab=readme-ov-file#configuration-options for more options.
For example, if you use lazy.nvim
return { { 'mikesmithgh/kitty-scrollback.nvim', enabled = true, cmd = { 'KittyScrollbackGenerateKittens', 'KittyScrollbackCheckHealth' }, event = { 'User KittyScrollbackLaunch' }, config = function() require('kitty-scrollback').setup({ { paste_window = { yank_register_enabled = false, }, }, }) end, }, } I suppose the name for the option isn't obvious though. It would probably just make more sense to have it enabled.
This is my plugin config. When I press i it still shows the paste window.
{
"mikesmithgh/kitty-scrollback.nvim",
lazy = true,
cmd = {
"KittyScrollbackGenerateKittens",
"KittyScrollbackCheckHealth",
"KittyScrollbackGenerateCommandLineEditing",
},
event = { "User KittyScrollbackLaunch" },
config = function()
require("kitty-scrollback").setup({
{
paste_window = {
yank_register_enabled = false,
},
status_window = {
autoclose = false, -- <-- set this to false
},
},
})
end,
},
@Oneechan69 I see. This will only disable the paste window on yank events but not on term enter events. So yy would not open it but i or a would still open it.
I'll make this a feature request 👍
Hey, I just came here looking for a solution for a similar thing. I want to completely disable buffer window. I am happy with only being able to take current terminal into nvim. This is what I tried so far:
myconf = {
status_window = {
enabled = false,
autoclose = false,
},
paste_window = {
enabled = false,
yank_register_enabled = false,
},
keymaps_enabled = false,
kitty_get_text = {
ansi = true,
},
},
You can do this before calling setup, but be ware, it's monkey patching.
local autocmds = require("kitty-scrollback.autocommands")
autocmds.set_term_enter_autocmd = function(_) end
autocmds.set_yank_post_autocmd = function() end
require("kitty-scrollback").setup({ keymaps_enabled = false })