🧠 Smart, seamless, directional navigation and resizing of Neovim + terminal multiplexer splits. Supports tmux, Wezterm, and Kitty. Think about splits in terms of "up/down/left/right".
MIT License
895
stars
37
forks
source link
[Feature]: Improve mux auto-detection and make lookup more flexible #141
[X] Before filing, I have searched for similar issues.
Description
Recently there's been an increase in issues related to mux auto-detection, and an interesting use-case in #140. Using tmux in other terminals, but kitty mux in kitty.
Mux auto-detection needs to be made more robust, and we also need to make the priority order configurable, so that e.g. if tmux is installed and you're using kitty, but you want to use kitty mux in the kitty terminal, you can specify that kitty should take precedence here.
I'm thinking we can do something like:
local mux_lookup = {
tmux = function()
local term = vim.trim((vim.env.TERM_PROGRAM or ''):lower())
return term == 'tmux'
end,
wezterm = function()
local term = vim.trim((vim.env.TERM_PROGRAM or ''):lower())
return term == 'wezterm'
end,
kitty = function()
return vim.env.KITTY_LISTEN_ON ~= nil and #vim.env.KITTY_LISTEN_ON > 0
end,
}
Similar Issues
Description
Recently there's been an increase in issues related to mux auto-detection, and an interesting use-case in #140. Using tmux in other terminals, but kitty mux in kitty.
Mux auto-detection needs to be made more robust, and we also need to make the priority order configurable, so that e.g. if tmux is installed and you're using kitty, but you want to use kitty mux in the kitty terminal, you can specify that kitty should take precedence here.
I'm thinking we can do something like:
And then the config would be something like: