Pair programming plugin for neovim written in Lua using Vim client-server communication.
Warning
This plugin demonstrates collaborative programming in neovim as a concept. I plan to create a more reliable version at some point in the future. Any contributions are welcome.
pair.nvim starts a peer-to-peer "server" (:PairServer
) and "client"
(:PairClient
) for the current buffer.
- Sync changed text in buffer
- Display changed cursor position in remote
- Display visual selection in remote
requests are discarded if the buffer (require("pair").bufnr
) buffer is
removed from the window. Sharing can be completely stopped with :PairStop
and
then resumed from any buffer.
Using lazy.nvim
return {
"skeletony007/pair.nvim",
config = true,
}
local pair = require("pair")
Defaults
pair.setup({
-- named pipe or socket address (see `:help remote`)
server_addr = os.getenv("HOME") .. "/.cache/nvim/pair-server.pipe",
client_addr = os.getenv("HOME") .. "/.cache/nvim/pair-client.pipe",
virtual_cursor_blame_prefix = " remote ",
})
PairVirtualCursor
Used for the virtual cursor.
PairVirtualBlame
Used for the virtual cursor blame.