Skip to content

Commit 726db52

Browse files
committed
Update README.md
Update README.md Update README.md
1 parent 8d43cab commit 726db52

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

README.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# 📡 sshfs.nvim
22

3-
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4-
[![Neovim](https://img.shields.io/badge/NeoVim-0.10+-57A143?logo=neovim)](https://neovim.io/)
5-
[![GitHub stars](https://img.shields.io/github/stars/uhs-robert/sshfs.nvim?style=social)](https://github.com/uhs-robert/sshfs.nvim/stargazers)
6-
[![GitHub issues](https://img.shields.io/github/issues/uhs-robert/sshfs.nvim)](https://github.com/uhs-robert/sshfs.nvim/issues)
3+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
4+
[![Neovim](https://img.shields.io/badge/NeoVim-0.10+-57A143?logo=neovim&style=for-the-badge)](https://neovim.io/)
5+
[![GitHub stars](https://img.shields.io/github/stars/uhs-robert/sshfs.nvim?style=for-the-badge)](https://github.com/uhs-robert/sshfs.nvim/stargazers)
6+
[![GitHub issues](https://img.shields.io/github/issues/uhs-robert/sshfs.nvim?style=for-the-badge)](https://github.com/uhs-robert/sshfs.nvim/issues)
77

88
A minimal, fast **SSHFS** integration for **NeoVim** that **works with YOUR setup**. No forced dependencies. Use your preferred file picker, search tools, and workflow to edit remote files without leaving your editor.
99

@@ -108,12 +108,12 @@ You can optionally customize behavior by passing a config table to setup().
108108
require("sshfs").setup({
109109
connections = {
110110
ssh_configs = require("sshfs.core.config").get_default_ssh_configs(),
111-
sshfs_args = {
112-
"-o reconnect",
113-
"-o ConnectTimeout=5",
114-
"-o compression=yes",
115-
"-o ServerAliveInterval=15",
116-
"-o ServerAliveCountMax=3",
111+
sshfs_args = { -- these are the sshfs options that will be used
112+
"-o reconnect", -- Automatically reconnect if the connection drops
113+
"-o ConnectTimeout=5", -- Time (in seconds) to wait before failing a connection attempt
114+
"-o compression=yes", -- Enable compression to reduce bandwidth usage
115+
"-o ServerAliveInterval=15", -- Send a keepalive packet every 15 seconds to prevent timeouts
116+
"-o ServerAliveCountMax=3", -- Number of missed keepalive packets before disconnecting
117117
},
118118
},
119119
mounts = {
@@ -154,6 +154,11 @@ require("sshfs").setup({
154154
})
155155
```
156156

157+
>[!TIP]
158+
> The `sshfs_args` table can accept any configuration option that applies to the `sshfs` command. You can learn more about [sshfs mount options here](https://man7.org/linux/man-pages/man1/sshfs.1.html).
159+
>
160+
> In addition, sshfs also supports a variety of options from [sftp](https://man7.org/linux/man-pages/man1/sftp.1.html) and [ssh_config](https://man7.org/linux/man-pages/man5/ssh_config.5.html).
161+
157162
## 🔧 Commands
158163

159164
- `:SSHConnect [host]` - Connect to SSH host (picker or direct)
@@ -171,12 +176,12 @@ This plugin optionally provides default keybindings under `<leader>m`. These can
171176

172177
| Mapping | Description |
173178
| ------------ | ------------------------- |
174-
| `<leader>me` | Edit SSH config files |
175-
| `<leader>mg` | Grep remote files |
176179
| `<leader>mm` | Mount an SSH host |
177-
| `<leader>mo` | Browse remote mount |
178-
| `<leader>mr` | Reload SSH configuration |
179180
| `<leader>mu` | Unmount an active session |
181+
| `<leader>me` | Edit SSH config files |
182+
| `<leader>mr` | Reload SSH configuration |
183+
| `<leader>mo` | Browse remote mount |
184+
| `<leader>mg` | Grep remote files |
180185

181186
If [which-key.nvim](https://github.com/folke/which-key.nvim) is installed, the `<leader>m` group will be labeled with a custom icon (`󰌘`).
182187

@@ -186,14 +191,14 @@ You can override the keymaps or the prefix like this:
186191

187192
```lua
188193
require("sshfs").setup({
189-
lead_prefix = "<leader>s", -- change keymap prefix (default: <leader>m)
194+
lead_prefix = "<leader>m", -- change keymap prefix (default: <leader>m)
190195
keymaps = {
191-
mount = "<leader>sm",
192-
unmount = "<leader>su",
193-
edit = "<leader>se",
194-
reload = "<leader>sr",
195-
open = "<leader>so",
196-
grep = "<leader>sg",
196+
mount = "<leader>mm",
197+
unmount = "<leader>mu",
198+
edit = "<leader>me",
199+
reload = "<leader>mr",
200+
open = "<leader>mo",
201+
grep = "<leader>mg",
197202
},
198203
})
199204
```

0 commit comments

Comments
 (0)