Skip to content

Add --clientProcessId like reference LSP server - #4866

Open
Jake Bailey (jakebailey) wants to merge 1 commit into
mainfrom
jabaile/fix-4809
Open

Add --clientProcessId like reference LSP server#4866
Jake Bailey (jakebailey) wants to merge 1 commit into
mainfrom
jabaile/fix-4809

Conversation

@jakebailey

Copy link
Copy Markdown
Member

Fixes #4809 by way of adding a flag that can be used to override. With this, the caller can override the parent PID; this is how the reference LSP server works, using the flag if provided, otherwise the init message's.

Copilot AI balanced review requested due to automatic review settings August 10, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds --clientProcessId support to override the LSP initialization PID used by the parent-process watchdog.

Changes:

  • Registers the new CLI flag.
  • Prioritizes the CLI PID over the initialization message PID.
  • Starts the watchdog immediately when an override is supplied.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread cmd/tsgo/lsp.go
Comment on lines +82 to +84
if clientProcessID > 0 {
startParentProcessWatchdog(ctx, stop, clientProcessID)
return nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LSP exits when parent process PID is not found

2 participants