-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
roslyn-lsp --stdio option (or --pipe with a client-created pipe) #72871
Comments
@dibarbet Can you either assign to a milestone, or close out as not planned if we are sticking with the current approach. |
3rd party analyzers / code actions / etc sometimes write to stdout and corrupt the output. However I understand that sometimes a simple stdout option would be useful. I would accept a contribution here to add an
We were not entirely convinced that nodejs' implementation of creating a named pipe on Windows passed the correct security flags (only readable/writable to current user, max number of connections, etc). We found it more expedient and verifiable to create the named pipe on the .NET side and send it back to the client to connect to. I don't think we would want to add support for a |
This sounds reasonable to me.
Can we reconsider this? Because actually the upcoming LSP spec 3.18 is pretty clear about how the server should implement that:
While I understand the reason you described, I don't think all clients have to be forced into an off spec implementation to circumvent the shortcomings of one specific client platform. Having the pipe parameter optional could satisfy both requirements with minimal effort. What do you think? If you are okay with that I could create a PR with the changes. |
Had some discussions with others on the team - we'd be OK with accepting an optional |
@dibarbet this are great news, thank you! I would like to take this one and will prepare a PR in the next few days. |
Do you also have any plans to add the --stdio option? A lot of editors' lsp clients don't support named pipes yet and also the spec recommends having a --stdio option so can we have both the --pipe and --stdio option? |
@captain0xff We accept PRs :) |
Sure, I was just confirming if a PR with the --stdio option will be accepted after the --pipe option is added as this issue only requests for one of them. |
Yup. See #72871 (comment) |
One thought is that we would use the stream returned from |
I added a new issue about stdio support: #76436 to more easily track potential progress on this :) I am considering looking into this myself, but if someone else beats me to it, then it would be great if that issue could be used to communicate about it :) PS: sorry if I didn't create the issue correctly, but I didn't know which category it belonged to, so I just opened an empty one |
Summary
Using roslyn-ls with an editor that is not vscode is hard because roslyn-ls creates its own pipe to communicate. I would expect communication channel to be defined by the client, with cmd line args like recommended on the spec: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#implementationConsiderations (having
--stdio
or--pipe /tmp/roslyn.sock
).Background and Motivation
I'm trying to add roslyn-ls to neovim's builtin lsp client, you can find the whole discussion there: neovim/nvim-lspconfig#2657
Proposed Feature
Support
--stdio
(which was the default before #69918, it seems changing fixed a bug, but I don't understand how)Or support
--pipe <pipe-path>
to allow the client to specify its own pipe before creating the server.The text was updated successfully, but these errors were encountered: