Skip to content
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

Add --wait-for-client option to lsp-devtools agent command #29

Closed
alcarney opened this issue Jan 8, 2023 · 0 comments · Fixed by #63
Closed

Add --wait-for-client option to lsp-devtools agent command #29

alcarney opened this issue Jan 8, 2023 · 0 comments · Fixed by #63
Labels
enhancement New feature or request lsp-devtools Issues affecting the lsp-devtools package

Comments

@alcarney
Copy link
Member

alcarney commented Jan 8, 2023

It would be nice to be able to wait for a client to connect to the agent before connecting the client to the server.
Especially useful when trying to capture initialize request/responses

@alcarney alcarney added enhancement New feature or request lsp-devtools Issues affecting the lsp-devtools package labels Jan 8, 2023
@alcarney alcarney changed the title Add --wait-for-client option to lsp-devtools --agent command Add --wait-for-client option to lsp-devtools agent command Jan 10, 2023
alcarney added a commit to alcarney/lsp-devtools that referenced this issue Jun 21, 2023
Originally, the assumption was that the lsp agent would host a server
that commands like `lsp-devtools record` and `lsp-devtools tui`
would connect to.

However this posed a number of issues, such as commands like `record`
missing the beginning of a session since the agent would not wait for
a connection (swyddfa#29) as well as the agent not stopping once an LSP
session ended (swyddfa#17)

So this commit reverses that relationship, with commands like
``record`` spinning up the server and the lsp agent creating a client
connection.

Additionally this commit
- Switches to using the base `Client` provided by a future version of
  `pygls`
- Trials using async stdin/stdout streams for the agent - a potential
  candidate someday for upstreaming into `pygls`
- Switches to using a TCP connection between client and server. (swyddfa#37)
alcarney added a commit that referenced this issue Jun 21, 2023
Originally, the assumption was that the lsp agent would host a server
that commands like `lsp-devtools record` and `lsp-devtools tui`
would connect to.

However this posed a number of issues, such as commands like `record`
missing the beginning of a session since the agent would not wait for
a connection (#29) as well as the agent not stopping once an LSP
session ended (#17)

So this commit reverses that relationship, with commands like
``record`` spinning up the server and the lsp agent creating a client
connection.

Additionally this commit
- Switches to using the base `Client` provided by a future version of
  `pygls`
- Trials using async stdin/stdout streams for the agent - a potential
  candidate someday for upstreaming into `pygls`
- Switches to using a TCP connection between client and server. (#37)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lsp-devtools Issues affecting the lsp-devtools package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant