Open oddnugget opened 8 months ago
Hm, the issue is because of $WEZTERM_PANE
not being set in the SSH session, but I'm not sure how to work around it.
Hmm ok. Sounds like more of a wezterm issue then
It seems to work when connecting to the persistent ssh domain instead of the ad-hoc one. e.g wezterm connect <domain>
In the case where it doesn't work, if you run wezterm cli list --format json
does it show the correct pane as active? If so we can work around it by using that to get the active pane ID instead of relying on $WEZTERM_PANE
and then passing --pane-id
In the case where it doesn't work, if you run wezterm cli list --format json does it show the correct pane as active? If so we can work around it by using that to get the active pane ID instead of relying on $WEZTERM_PANE and then passing --pane-id
It just returns an empty list :/
But I'm unsure how that connection would work anyway, how should the wezterm cli running on the remote machine know things about the local wezterm gui.
My guess is when connecting using the persistent ssh domain it uses the socket somehow.
Interesting. I have the same issue but even without an ssh connection. Just wezterm and Neovim
Interesting. I have the same issue but even without an ssh connection. Just wezterm and Neovim
I'm in the same situation as you, and so far I've come to the conclusion that neovim doesn't receive key events, but inside neovim you can see that shortcuts have been bound via :verbose map
But when I use vim.notify to throw an exception in the smart-splits source code, the shortcut is again available using the.
function M.get()
if
config.multiplexer_integration == nil
or config.multiplexer_integration == false
or #tostring(config.multiplexer_integration or '') == 0
then
return nil
end
local ok, mux = pcall(require, string.format('smart-splits.mux.%s', config.multiplexer_integration))
print(ok) # no error
print(vim.inspect(mux)) # no error
vim.notify(ok) # error
if not ok then
log.error(mux)
end
return ok and mux or nil
end
Interesting. Could you open a separate issue for that?
Interesting. Could you open a separate issue for that?
is because of $WEZTERM_PANE not being set in the SSH session
Pretty sure it's all related to this. Still investigating.
See also: https://github.com/wez/wezterm/discussions/5378#discussioncomment-9377194
It should be something like AcceptEnv WEZTERM_PANE
on the server, and maybe some client config. However I've been unable to get a working SSH config.
So I can reproduce this with normal ssh but I actually cannot reproduce using wezterm ssh
Similar Issues
Neovim Version
Multiplexer Integration
Wezterm
Multiplexer Version
wezterm 20240203-110809-5046fc22
Steps to Reproduce
wezterm ssh <your-host>
Expected Behavior
You should be able to navigate out of neovim split in a
wezterm ssh <host>
session.Actual Behavior
You can only navigate to an neovim split, not out of it.
Minimal Configuration to Reproduce
Additional Details and/or Screenshots
I've been digging around a bit on this one, and from what i can gather it is only an issue when using wezterms built in ssh client, e.g if if i run
ssh <host>
switching between panes works.I've set up the shell-integrations as per the instructions in the wezterm docs: https://github.com/wez/wezterm/blob/main/assets/shell-integration/wezterm.sh and can confirm that the
IS_NVIM
user var is being set correctly and is accessible from outside the remote host.I can't see anything interesting in
:SmartSplitsLog
It seems that the call to
wezterm_exec({ 'get-pane-direction', direction })
here https://github.com/mrjones2014/smart-splits.nvim/blob/78f0c74ea1d5aa1725ab63b25761886245622904/lua/smart-splits/mux/wezterm.lua#L97C1-L97C43 doesn't return anything.Running the command in bash on the remote host gives the following error:
Edit: though that might be because i didn't specify it when running the command