Git Product home page Git Product logo

Comments (4)

smolck avatar smolck commented on May 25, 2024

Thanks for the issue! It appears the problem is due to not being able to connect to the neovim pipe to communicate over RPC. Since it’s running neovim in WSL, I’m guessing it’d have to connect a slightly different way.

However, looking at the code, I’m not really sure why it doesn’t just communicate over the neovim process’s stdin/stdout (this is left over from Veonim, so I’m not sure why that was originally done; might have been done for the multiple nvim instance feature, but I still don’t really think it’s necessary). I think modifying things to drop pipes altogether and just use stdin/stdout might fix this issue (assuming I understand the code properly), but that might take some time. I’ll try and look into it soon and see what I can do/find.

EDIT: Why the above is done is detailed in this comment: #24 (comment)

from uivonim.

smolck avatar smolck commented on May 25, 2024

@kalvinpearce Could you run :echo $NVIM_LISTEN_ADDRESS and comment the output here? I'm not sure how --listen behaves when running nvim through WSL (I'm guessing it's mostly like Linux though), and so seeing an example might be helpful. I think the main thing to change will be this:

export const getPipeName = (name: string) =>
process.platform === 'win32'
? `\\\\.\\pipe\\${name}${uuid()}-sock`
: join(tmpdir(), `${name}${uuid()}.sock`)

That line just gets the name for the pipe used by Neovim when --listen is passed an argument, but I'm guessing it's failing on WSL since the path won't be the same as if it were just on Windows.

(Note that the proper fix might be to drop the pipe altogether, but I need to look into it as I said above and I don't think that should necessarily block this issue.)

from uivonim.

kalvinpearce avatar kalvinpearce commented on May 25, 2024

Running :echo $NVIM_LISTEN_ADDRESS returns the following:
image

This matches the error from the developer console output (as seen in the original screenshot) so I think you're on to something with it not being about to connect to the pipe

from uivonim.

smolck avatar smolck commented on May 25, 2024

Hmm, so it appears the pipe name is correct, it’s just having trouble connecting. This WSL issue seems to be relevant: microsoft/WSL#4204

This issue also seems to be relevant: microsoft/WSL#4150

So it seems to be more of a WSL issue than an uivonim issue; however, I think it could still be fixed, or at least worked around. ATM a separate thread is used to communicate with neovim for performance purposes (although the performance improvement it supposedly offers is only really anecdotal at this point), and it does so over a socket, but I could potentially also provide an option to only use one thread. I’m guessing that would fix this issue, since all communication with neovim would take place over the stdin/stdout of the child nvim process, but it also might cause some issues.

I’m also not sure how hard that would be to do, and I think the code will need some other work beforehand, so unfortunately I don’t know how long it’ll take to fix this.

from uivonim.

Related Issues (20)

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.