Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
BrendanMesters opened this issue Dec 2, 2024 · 2 comments
Open
1 task done

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

BrendanMesters opened this issue Dec 2, 2024 · 2 comments
Labels
enhancement New feature or request P2 Not a priority. PRs welcome

Comments

@BrendanMesters
Copy link

Did you check existing requests?

  • I have searched the existing issues

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.

@BrendanMesters BrendanMesters added the enhancement New feature or request label Dec 2, 2024
@stevearc
Copy link
Owner

stevearc commented Dec 3, 2024

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:

  • ssh/connection.lua initiates a ssh connection with the server and spawns a shell. It feeds commands to it via stdin and reads the result from stdout. The main useful method it exposes is run.
  • ssh/sshfs.lua owns a SSHConnection and exposes some higher level filesystem commands, such as list_dir, mv, and cp.
  • adapters/ssh.lua is the oil-level abstraction that provides all the methods required to support oil. It manages the SSHFS objects.

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 neovim/neovim#21635.

@stevearc stevearc added the P2 Not a priority. PRs welcome label Dec 3, 2024
@BrendanMesters
Copy link
Author

aaah, thats too bad, but thanks for your response none the less.

I might look into setting up some scripts to just mount the specified servers via sshfs then :-)

And many thanks for your awesome plugin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 Not a priority. PRs welcome
Projects
None yet
Development

No branches or pull requests

2 participants