Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azratul/live-share.nvim
Creates a "Live Share" server in Neovim, similar to the Visual Studio Code Live Share functionality
https://github.com/azratul/live-share.nvim
code-sharing collaboration developer-tools live-coding live-share neovim nvim pair-programming plugin
Last synced: about 1 month ago
JSON representation
Creates a "Live Share" server in Neovim, similar to the Visual Studio Code Live Share functionality
- Host: GitHub
- URL: https://github.com/azratul/live-share.nvim
- Owner: azratul
- License: gpl-3.0
- Created: 2024-07-18T01:08:44.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-27T17:59:05.000Z (about 2 months ago)
- Last Synced: 2024-09-29T06:03:59.732Z (about 2 months ago)
- Topics: code-sharing, collaboration, developer-tools, live-coding, live-share, neovim, nvim, pair-programming, plugin
- Language: Lua
- Homepage:
- Size: 27.3 KB
- Stars: 53
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Live Share Plugin for Neovim
[![total lines](https://tokei.rs/b1/github/azratul/live-share.nvim)](https://github.com/XAMPPRocky/tokei)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/azratul/live-share.nvim)
![GitHub repo size](https://img.shields.io/github/repo-size/azratul/live-share.nvim)## Overview
This plugin creates a "Live Share" server in Neovim, similar to the Visual Studio Code Live Share functionality. It relies heavily on another plugin called [jbyuki/instant.nvim](https://github.com/jbyuki/instant.nvim) and reverse tunneling services like [serveo.net](https://serveo.net/) and [localhost.run](https://localhost.run/).
Note: This plugin is designed to work exclusively between Neovim instances and is not compatible with Visual Studio Code Live Share sessions.
### Requirements
- **SSH**: You must have SSH installed on your system. This is required for tunneling with services like serveo.net or localhost.run.
- **Tested Environments**: This plugin has been tested on **Linux** and **OpenBSD** distributions. It has not been tested or officially supported on **macOS** or **Windows**.## Installation
### Using Packer
```lua
use {
'azratul/live-share.nvim',
requires = {'jbyuki/instant.nvim'}
}
```### Using Vim-Plug
```vim
Plug 'azratul/live-share.nvim'
Plug 'jbyuki/instant.nvim'
```### Using Lazy
```lua
{
"azratul/live-share.nvim",
dependencies = {
"jbyuki/instant.nvim",
}
}
```## Usage
### Commands
- `:LiveShareServer [port]`: Start a Live Share server.
Example: `:LiveShareServer 9876`- `:LiveShareJoin [url] [port]`: Join a Live Share session.
Example: `:LiveShareJoin abc.serveo.net 80`After starting the server, wait for the message indicating the URL has been copied. This URL is copied to the clipboard and should be shared with the client who wants to connect to the session.
Note: The port is optional for :LiveShareServer. For :LiveShareJoin, it's recommended not to change the port as serveo.net and localhost.run typically uses port 80 by default.
### Preview
![Live Share Preview](https://raw.githubusercontent.com/azratul/azratul/86d27acdbe36f0d4402a21e13b79fafbaec1ffc9/live-share.gif)
## Basic settings
These settings are optional. You don't need to change them unless you want to customize the plugin's behavior.
```lua
require("live-share").setup({
port_internal = 9876, -- The local port to be used for the live share connection
max_attempts = 20, -- Maximum number of attempts to read the URL from service(serveo.net or localhost.run), every 250 ms
service_url = "/tmp/service.url", -- Path to the file where the URL from serveo.net will be stored
service_pid = "/tmp/service.pid", -- Path to the file where the PID of the SSH process will be stored
service = "localhost.run", -- Service to use, options are serveo.net or localhost.run
})
```### Lazy Example
```lua
{
"azratul/live-share.nvim",
dependencies = {
"jbyuki/instant.nvim",
},
config = function()
vim.g.instant_username = "your-username"
require("live-share").setup({
port_internal = 8765,
max_attempts = 40, -- 10 seconds
service = "serveo.net"
})
end
}
```## Contributing
Feel free to open issues or submit pull requests if you find any bugs or have feature requests.
## Credits
[instant.nvim](https://github.com/jbyuki/instant.nvim) - No longer maintained.
## License
This project is licensed under the GPL-3.0 License.
# live-share.nvim