equalsraf / neovim-qt

Neovim client library and GUI, in Qt5.
https://github.com/equalsraf/neovim-qt/wiki
ISC License
1.86k stars 171 forks source link

GuiTreeviewShow does not work properly when connecting to neovim on remote machine #1122

Open crabuz opened 3 months ago

crabuz commented 3 months ago

I'm using neovim-qt v0.2.16.0 and connecting to a neovim instance of v0.7.2 running on a remote machine via ssh socket forward.

The nvim_gui_shim plugin was loaded, so the Gui* commands could be found. But when using the command GuiTreeviewShow, it displays the files on local machine instead of the files on remote machine

jgehrig commented 3 months ago

Interesting bug!

It makes sense based on how the code is designed: Qt parses and builds the TreeView from the local filesystem. The logic is separate from the Vim/Neovim infrastructure.

I can't think of a simple way to make Qt aware of the remote machine's filesystem. Not to mention, doing so might open up a whole new level of complexity and potential security issues.

Unfortunately, this might be a "Won't Fix" issue.

equalsraf commented 3 months ago

Yeah, I agree. The tree view was never designed for this. Currently it only forwards the current working directory.

A full solution for this would be to implement vimscript to forward the directory contents to GUI instead of just sending the path, but this can be expensive (large folders and so on).

For reference, these are the locations where the event is sent and used: