-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Configurable LSP transport #3819
base: main
Are you sure you want to change the base?
Configurable LSP transport #3819
Conversation
🦋 Changeset detectedLatest commit: c1e6bf2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
good idea! originally vscode only supported IPC, wasn't aware that they support this. or other LSP users outside of vscode use these transports every day so they should indeed be ready to go |
@acao Great to hear. Anything missing or can this be merged, then? |
@robertoaloi I still need to confirm the bundled extension works. since you tested with Extension Run, that bypasses the esbuild and vsix bundle factors, though it should be fine. you can test it yourself by running vsce:package in vscode graphql and right clicking the .vsix and chose "install extension", vaugely similar to how testing browser plugins works |
Installed the .VSIX and everything seems to be working fine. Just a typo I'm going to fix now. |
good eye, I didn't even see the typo! you tested the extension when switching the modes and the server restarted appropriately, yes? this should be good for now, we should add the socket transport as well but I can add/test that later |
I reloaded the window with both settings and verified the server started in both cases and provided auto-completion. |
@acao We are good to go from my side, if you are happy. |
Currently, the VS Code GraphQL extension enforces IPC as the communication transport between the language client and the server. This is only one of the 4 communication channels recommended by the LSP specification.
Both the client and the server support
stdio
as a communication channel, so this change makes it configurable. This can be convenient in those environments where IPC communication may not be available.The default transport is unchanged.
A setting is added to allow users to quickly change the communication channel:
Tested via the
VS Code LSP Extension Run
functionality in VS Code:packages/graphql-language-service-server/src/__tests__
to the workspacestdio
test.graphql
fileGraphQL Language Server
Output looks correct