Remote development plugin for Neovim.
sudo apt install rsync
sudo apt install watchman
Using Lazy.nvim
-- plugins/sync-remote.lua:
return {
"syednabilashraf/sync-remote.nvim",
config = function()
require("sync-remote"):setup()
end
}
Using Packer.nvim
use {
'syednabilashraf/sync-remote.nvim',
config = function()
require("sync-remote"):setup()
end
}Create a .nvim/config.txt file at the root of your project with the following content:
remote_root [username@][hostname]:[remote_path]
local_root ~/example_path/
Config fields summary:
usernameusername to connect with hosthostnamethe host name or remote ip addressremote_paththe remote folder to be syncedremote_rootcombination of username, hostname and remote_path. Example: [email protected]:/home/john.doe/remote/projectlocal_rootthe local folder to be synced. Example: /home/john.doe/local/project
:SyncRemoteStartloads the .nvim/config.txt file in local source directory:SyncRemoteFileUpsyncs the active file from local to remote:SyncRemoteUpsyncs all files from local_root to remote_root:SyncRemoteDownsyncs all files from remote_root to local_root