Giter Site home page Giter Site logo

jbyuki / instant.nvim Goto Github PK

View Code? Open in Web Editor NEW
1.2K 16.0 20.0 712 KB

collaborative editing in Neovim using built-in capabilities

License: MIT License

JavaScript 5.42% Lua 92.86% Vim Script 1.72%
neovim-plugin collaborative-editing lua websocket neovim realtime-collaboration

instant.nvim's People

Contributors

gleachkr avatar jbyuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

instant.nvim's Issues

Is it possible to attach lsp to all clients buffer?

Very cool project! Thanks for that.

When pair programming with a colleague we encountered that first the person who opens a new buffer, has the lsp client attached to that buffer and gets all the code completion, warnings, etc. The other client, has the buffer open as well but without an lsp attached to it.

Is it possible to attach the lsp for all clients, so all clients can enjoy the lsp features?

Error executing vim.schedule lua callback: ...im/plugged/instant.nvim/lua/instant/websocket_client.lua:92: There was an error during connection: ETIMEDOUT

I want to host a remote server on heroku and the setup runs fine, the problem is when I want to use :InstantStartServer ip port and InstantStartSession ip portit return an error (i have also tried :InstantStartSingle ip port) and the result is the same. I'm pretty sure I've entered the ip and port correctly because in the heroku log it says Peer connected and no errors.

error:
Error executing vim.schedule lua callback: ...im/plugged/instant.nvim/lua/inst ant/websocket_client.lua:92: There was an error during connection: ETIMEDOUT stack traceback: [C]: in function 'error' ...im/plugged/instant.nvim/lua/instant/websocket_client.lua:92: in function 'cb' vim.lua:285: in function <vim.lua:285>
Neovim: v0.6.1

Enhancement: Use extmark instead of deprecated virtual text.

vim.api.nvim_set_virtual_text has been deprecated in Neovim. The API that replaces it vim.api.nvim_set_extmark is more feature-rich and allows for virtual text on the right side of the window.

Like this-

image

The screenshot if after making changes in the lua/instant.lua file. I do not understand the src code (or ntangle) enough to create a PR for this.

Doesn't work in neovim 0.4.4

vim.g is nil in neovim 0.4.4

E5108: Error while calling lua chunk for luaeval(): ...vftdan/.config/nvim/plugged/instant.nvim/lua/instant.lua:99: attempt to index field 'g' (a nil value)

Other editors

I'm not sure if this is out of the scope of this plugin, but is it possible to connect to other editors? Looking at the docs, it seems that it's not. Would be awesome to connect to coworkers that are using vscode/intellij plugins.

Any way to customize with colors

Hey

I know it seems childish, but is their any way to highlight the others users names with colors ?
I love this plugin, and it will be genius if we can change the colors of the names of the users to clearly detatch them from the rest of the text :)

Anyway well done for this plugin

Sync BufferWrites across clients

Currently if any client saves :w a file it is written only for that client (in his local directory).
Ideally this should also cause all clients to save the file.

Peer conected, bad argument L2255

Hey @jbyuki awesome project. I'm looking to experiment with and learn from it so thanks.

I've setup heroku server then executed InstantJoinSession damp-tundra-81540.herokuapp.com

I get the following error:

Error executing vim.schedule lua callback: 
...e/nvim/site/pack/packer/opt/instant.nvim/lua/instant.lua:2255: 
bad argument #1 to 'insert' (table expected, got nil)

Attempt to get length of local 'iptable' (a nil value)

I installed instant.nvim in my lunarvim config and set instant_username. Trying to connect to the server started from InstantStartServer, I get the following error:

E5108: Error executing lua ...cker/start/instant.nvim/lua/instant/websocket_client.lua:60: attempt to get length of local 'iptable' (a nil value)

What can I do to fix this?

Cursor highlights

Hello, this is a really great plugin!
I'm new to Vim and I find the highlight group configs confusing. Currently, when other users are editing a file, only their name is shown on the line they are currently editing. I'm wondering if there's a way to also show their cursor (perhaps in a different color), without having to follow them. Any guidance would be greatly appreciated.

When starting server it doesn't need args but joining session errors

Hi, following the guide for the first time was confusing until I saw the gif image.

Basically you use :InstantStartServer with no args, but InstantStartSession requires args otherwise I get a confusing error. To make it work, I had to use :InstantStartSession 127.0.0.1 8080.

Consider changing the defaults or at least adding a line in the README, and making the error message more informative.

Thanks a lot for this amazing tool

Can't deploy a server using ngrok on Windows

I just download this plugin today and the local editing works great. But I tried to follow the example of deploying a server using ngrok and it just don't works without giving me any errors.

I was trying to debug the code and I arrived at lua/instant/websocket_client.lua inside the method ws:connect, on the callback, on client:read_start it turns out that http_chunk does not match the expression "\r\n\r\n$" since the value is something similar to:

HTTP/1.1 307 Temporary Redirect\r\nContent-Type: text/html; charset=utf08\r\nLocation: https://6c33-186-34-245-88.ngrok.io:80/\r\nDate: Mon, 18 Apr 2022 20:58:46 GMT\r\nContent-Length: 75\r\n\r\n<a href="https://6c33-186-34-245-88.ngrok.io:80/">Temporary Redirect</a>.\n\n'

What confuses me the most is that using ngrok Web interface (https://localhost:4040) it doesn't even shows an http request being made but if I open the same URL on a web browser, it shows a Get request.

I thought this could be a firewall problem, so I turned it off and tryed again, but I got the same result.

Side note: what are the [something].lua.t files on src/ I found that you have a plugin to compile them to lua or (i think) vimscript, but what language/format are they? I tried to google it and just find something about Turing files.

InstantStartSession always caueses ECONNREFUSED. Tried different hosts and ports. Tried disabling firewall.

Hello, thank you for your support and for this plugin.

I am working on a windows 10 machine. I tried to run this plugin using the :InstantStartSession 127.0.0.1 8080 command, but the only result I ever get is:

Error executing vim.schedule lua callback: ...es\plugged\instant.nvim\lua\instant\websocket_client.lua:92: There was an error during connection: ECONNREFUSED
Disconnected.

I tried using different hosts and ports. I also tried turning off the windows firewall, but it does not seem to help. How can I fix this?

Self standing server in a Docker container feature request

Hi there!
Love this initiative and it might be exactly what I'm looking for!
I wonder if there's any examples of how to spin up a docker container with just the server running in it.
Is there a way to have the server running without the nvim installation? If it's with, what would be the easiest steps to get it up and running?

My initial thoughts are:
Grab whatever image
Install nvim
Install instant.nvim
run nvim with the :InstantStartServer command

Edits from client not appearing on server

We tried this out, using ngrok and the client can see all the server changes but we only got the server to see the client's changes once; which was awesome when it worked.

What info can we try get you to determine the issue?

Unreliable undo and filetype detection

I was just testing this plugin and it's awesome! However, I had some issues. I thought I could combine them into one issue instead of creating two.

The first issue I encountered, was with undoing actions. They are behaving differently while attached to the server compared to regularly. For example, if I type something, and then start undoing, it deletes one character for each undo. Normally this would undo the entire line. Also, if I delete something with 'dd', it sometimes won't let me undo this action, and says "Already at oldest change", even though I just deleted a line.

The other issue was with detecting the filetype when joining a server. If I opened a buffer with no filetype and then connected to the server, it didn't detect the correct filetype. This lead to no syntax highlighting. I could fix this issue by simply setting the filetype manually with set ft, but it would be great if it was possible to automatically detect the correct filetype.

How to deal with jump server?

I always use this command to login server (just for example):

ssh [email protected] -p 5566

In fact, when I login, it drives me to another machine 777.888.999.000 (cannot be public beacuse of security).

Now in the 777.888.999.000 machine, I use :InstantStartServer 127.0.0.1 7890 to start a server.

In my personal computer, I want to connect the started server 777.888.999.000 but I cannot directly connect it beacuse it cannot be public, must login by the jump server 111.222.333.444 and in the port 5566

So I try to use :InstantStartSession 111.222.333.444:5566 7890 but it doesn't work, obviously.

How should I do to deal with the jump server?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.