stevearc / oil.nvim

Neovim file explorer: edit your filesystem like a buffer
MIT License
4.12k stars 123 forks source link

feature request: Have more documentation on the SSH Adapter #525

Open BrendanMesters opened 1 day ago

BrendanMesters commented 1 day ago

Did you check existing requests?

Describe the feature

I would like some more in depth descriptions (potentially in their own markdown file) of how the oil-ssh adapter works. Or more specifically how one could interface with it, to have it work nicely with other plugins which use the file system.

Provide background

I find that oil-ssh works wonderfully, until I try to use any other tool which interfaces with file systems, which breaks it... I would love it if I could hook up another file viewer (tree view) and my telescope to the remote file system.

The current documentation does not yet give enough information on how the file system is ¿mounted? to do this, or to know if its even possible.

What is the significance of this feature?

nice to have

Additional details

I tried to look through the ssh adapter to see if I can find where the files get mounted (if they get mounted) and could not find it. I also asked online if anyone knew how I could connect other plugins to the oil-ssh file system, but got no useful replies.

stevearc commented 1 day ago

It works mostly the way that netrw works over ssh, with some optimizations. Unfortunately, there is no good or easy way to interface with it from other plugins (e.g. telescope or fzf). There's a layer of abstractions that we use:

So nothing is really "mounted", and the connection is not exposed in any useful way for other plugins. For your use case, I would recommend either sshfs to actually mount the remote filesystem, distant.nvim, or wait for some solution to get built in to Neovim https://github.com/neovim/neovim/issues/21635.