I’m trying to figure out if neovim’s builtin LSP client offers any other way to start the client without requiring a command to be run where neovim talks to the spawned LSP server over stdin & stdout.
- If I already had an LSP running, could I attach to it?
- If I had some alternative means to talk to the LSP server, could I provide a means for the neovim client to send requests to it and receive responses that isn’t stdin/stdout?
I’m working on a plugin that enables editing files, running programs, and using neovim’s LSP client against a remote machine. Similar to Facebook’s old nuclide offering or Microsoft’s remote code development.
The plugin is currently functional and works just fine including the LSP client, but it requires me spawning additional processes - one per LSP client - to mirror the remote LSP’s stdout/stderr as well as supporting the client sending requests via stdin.
I’d like to simplify this by forwarding the LSP client’s requests to my already-running process and passing back results to the client. Ideally, this would happen by letting me package up the client’s stdin to send to my proxy and then unpackage the response, which would be in JSON.