Neovim plugin for 🍃 Ethersync-compatible collaborative software
This plugin adds real-time collaborative editing functionality to Neovim. You can use it for pair programming or note-taking, for example. It is mainly meant to be used with Ethersync, but can also be configured to work with other collaborative software speaking the same protocol.
Important
This plugin requires at least Neovim 0.7.0 (which was released in 2022).
If you're not using a plugin manager, here's a "quick and dirty" way to install the plugin:
git clone https://github.com/ethersync/ethersync-nvim $HOME/.local/share/nvim/site/pack/plugins/start/ethersync
Usually, you will add the string "ethersync/ethersync-nvim"
to your plugin manager. Here's some example configuration blocks:
{
"ethersync/ethersync-nvim",
keys = {
{ "<leader>ej", "<cmd>EthersyncJumpToCursor<cr>" },
{ "<leader>ef", "<cmd>EthersyncFollow<cr>" },
{ "<esc>", mode = { "n" }, "<cmd>EthersyncUnfollow<cr>" },
},
lazy = false,
}
{
"ethersync/ethersync-nvim",
config = function()
vim.keymap.set('n', '<leader>ej', '<cmd>EthersyncJumpToCursor<cr>')
vim.keymap.set('n', '<leader>ef', '<cmd>EthersyncFollow<cr>')
vim.keymap.set('n', '<esc>', '<cmd>EthersyncUnfollow<cr>')
end
}
For testing purposes, you can run an Ethersync-enabled Neovim like this:
nix run github:ethersync/ethersync#neovim
To confirm that the plugin is installed, try running the :EthersyncInfo
command in Neovim. It should show the message "Not connected to Ethersync daemon."
We recommend creating mappings for the :EthersyncJumpToCursor
, :EthersyncFollow
and EthersyncUnfollow
command, see above configurations for examples.
See the help file for details on configuring this plugin.