1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
return {
"nosduco/remote-sshfs.nvim",
dependencies = { "nvim-telescope/telescope.nvim" },
opts = {
-- Refer to the configuration section below
-- or leave empty for defaults
},
config = function()
require('remote-sshfs').setup{
connections = {
ssh_configs = { -- which ssh configs to parse for hosts list
vim.fn.expand "$HOME" .. "/.ssh/config",
"/etc/ssh/ssh_config",
-- "/path/to/custom/ssh_config"
},
sshfs_args = { -- arguments to pass to the sshfs command
"-o reconnect",
"-o auto_cache",
"-o Ciphers=aes128-ctr",
"-o ConnectTimeout=5",
"-C",
"-o cache_timeout=60",
"-o cache=yes",
},
},
mounts = {
base_dir = vim.fn.expand "$HOME" .. "/.sshfs/", -- base directory for mount points
unmount_on_exit = true, -- run sshfs as foreground, will unmount on vim exit
},
handlers = {
on_connect = {
change_dir = true, -- when connected change vim working directory to mount point
},
on_disconnect = {
clean_mount_folders = true, -- remove mount point folder on disconnect/unmount
},
on_edit = {}, -- not yet implemented
},
ui = {
select_prompts = false, -- not yet implemented
confirm = {
connect = true, -- prompt y/n when host is selected to connect to
change_dir = false, -- prompt y/n to change working directory on connection (only applicable if handlers.on_connect.change_dir is enabled)
},
},
log = {
enable = false, -- enable logging
truncate = false, -- truncate logs
types = { -- enabled log types
all = false,
util = false,
handler = false,
sshfs = false,
},
},
}
end
}
|