Skip to content

Commit

Permalink
fix: lsp stdin/stdout interface (neovim, etc) (#3628)
Browse files Browse the repository at this point in the history
  • Loading branch information
acao authored Jun 22, 2024
1 parent 9ab39d8 commit 7fad662
Showing 2 changed files with 9 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .changeset/dull-numbers-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'graphql-language-service-server': patch
'graphql-language-service-cli': patch
---

fix the lsp stream interface for stdin/out (neovim, etc)
13 changes: 3 additions & 10 deletions packages/graphql-language-service-server/src/startServer.ts
Original file line number Diff line number Diff line change
@@ -116,16 +116,9 @@ export default async function startServer(

break;
case 'stream':
const server = createLanguageServerConnection(
// @ts-expect-error this still works, just a type mismatch
process.stdin,
process.stderr,
{
connectionStrategy: 'stdio',
},
);
server.listen();
return server;
reader = new StreamMessageReader(process.stdin);
writer = new StreamMessageWriter(process.stdout);
break;

default:
reader = new IPCMessageReader(process);

0 comments on commit 7fad662

Please sign in to comment.