😽 kitty-scrollback.nvim: Open your Kitty scrollback buffer with Neovim. Ameowzing! #6637
Replies: 3 comments 2 replies
-
Added to kitty docs: 35766a1 |
Beta Was this translation helpful? Give feedback.
-
I looked into the implementation of this, its not clear to me why you need remote control? You can instead use something like this:
your kitten.sh can save the stdin to a file and run neovim on it. Similarly for ctrl+shift+g you use Indeed, it might even be possible to just set scrollback_pager to your kitten.sh though that might have knock-on side-effects. If you do want to use remote control there is no need to allow it globally, you can use launch --allow-remote-control to just allow remote control in the pager window. Be aware that neovim doesnt let you run commands with access to the underlying tty however, so you would need to run your commands to get the output before starting neovim. |
Beta Was this translation helpful? Give feedback.
-
On Mon, Sep 18, 2023 at 10:26:59AM -0700, Mike wrote:
Hi @kovidgoyal thanks for the feedback! I originally went that route, however, I ran into some issues passing stdin to Neovim. In order to make this work fast, I pass the stdin to Neovim's builtin terminal. In the case of ***@***.***_scrollback` the stdin would open in Neovim's buffer. I could do this and read from the buffer to Neovim's terminal, but this approach was slow. I also have some other API calls to Kitty here https://github.com/mikesmithgh/kitty-scrollback.nvim/blob/main/lua/kitty-scrollback/kitty_commands.lua which allow me to run commands in the original window.
Ah, OK.
That is a good point about the `--allow-remote-control` flag, I can look into that 👍. I was able to workaround the TTY issue with Neovim by using a domain socket.
Sadly --allow-remote-control only works via the TTY not a socket, the
reason being that it is window specific and each window is associated
with a tty so using the tty is natural.
|
Beta Was this translation helpful? Give feedback.
-
I just released
v1.0.0
of kitty-scrollback.nvim. If you have any feedback, issues, or suggestions feel free to open an issue. I'm interested to get feedback if the setup easy or if there are any unclear/confusing steps. This requires Neovim nightly (v0.10
) and Kittyv0.29
.✨ Features
Beta Was this translation helpful? Give feedback.
All reactions