mrjones2014 / smart-splits.nvim

🧠 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
904 stars 38 forks source link

[Meta]: Wezterm mux support notice #99

Closed phgz closed 1 year ago

phgz commented 1 year ago

Category

Docs

Description

Hi,

Really great plugin which I was excited to try. However, for the integration with Wezterm, it only works if you are not multiplexing/ssh, as in

local function is_vim(pane)
  local process_name = basename(pane:get_foreground_process_name())
  return process_name == 'nvim' or process_name == 'vim'
end

The pane:get_foreground_process_name() has limitations (https://wezfurlong.org/wezterm/config/lua/pane/get_foreground_process_name.html?h=get_foreground_process_name):

This information is only available for local panes. Multiplexer panes do not report this information. Similarly, if you are using eg: ssh to connect to a remote host, you won't be able to access the name of the remote process that is running.

This bit of information could be added in the docs for Wezterm.

Thanks!

mrjones2014 commented 1 year ago

Hmm, wouldn't this apply to all mux backends? I don't think any would report the foreground process name over an SSH boundary, or am I mistaken?

phgz commented 1 year ago

I don't know about kitty, but TMUX over SSH still does report foreground process.

phgz commented 1 year ago

I tried kitty, and it does not seem to work over SSH either. So only TMUX supports this feature.

mrjones2014 commented 1 year ago

Alright, thanks for testing that. I'll update the docs.

mrjones2014 commented 1 year ago

Opened #101 for this but it would be great if there was any way around this limitation.