Neovim plugin for pair-ls
- Neovim 0.5+
- pair-ls
pair-ls.nvim does not require the use of nvim-lspconfig.
pair-ls.nvim supports all the usual plugin managers
Packer
require('packer').startup(function()
use {'stevearc/pair-ls.nvim'}
end)
Paq
require "paq" {
{'stevearc/pair-ls.nvim'};
}
vim-plug
Plug 'stevearc/pair-ls.nvim'
dein
call dein#add('stevearc/pair-ls.nvim')
Pathogen
git clone --depth=1 https://github.com/stevearc/pair-ls.nvim.git ~/.vim/bundle/
Neovim native package
git clone --depth=1 https://github.com/stevearc/pair-ls.nvim.git \
"${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/pack/pair-ls/start/pair-ls.nvim
Note that the default cmd
will only work with static site WebRTC connections.
See the pair-ls repo for for more ways to
share.
-- Call the setup function
require("pair-ls").setup({
-- The pair-ls command to run
cmd = { "pair-ls", "lsp" },
-- The function configures the root directory for the server
root_dir = function(fname, util)
return util.root_pattern(".git", ".hg")(fname) or vim.loop.cwd()
end,
-- Pass a function here to run custom logic on attach
on_attach = function(client, bufnr) end,
-- See :help vim.lsp.start_client
flags = {
allow_incremental_sync = true,
debounce_text_changes = nil,
},
})
Command | description |
---|---|
Pair |
Start the pair-ls server |
PairUrl |
Show the sharing URL |
PairConnect |
Initiate or respond to a WebRTC connection |
PairStop |
Stop the pair-ls server |