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

debug language server startup #21

Merged
merged 2 commits into from
Feb 1, 2024
Merged

Conversation

friedbrice
Copy link
Contributor

This patch fixes the language server startup logic.

CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines -65 to -67
finally {
if (t) args.close(t)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

so it turns out i was closing the server just as soon as i was opening it, i think. actually, i'm not sure what the problem was.

@@ -12,6 +12,21 @@ export function makeClient(config: LanguageConfig): vscode.Disposable {
const { languageId, serverCommand } = config
if (!languageId || !serverCommand) return vscode.Disposable.from()

const serverExecutable = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The LSP client library will manage the child process for you if you just give it a process spec.

This is how the official Haskell extension launches HLS.

Copy link
Contributor Author

@friedbrice friedbrice left a comment

Choose a reason for hiding this comment

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

self-reviewed.

Copy link
Contributor

@josephsumabat josephsumabat left a comment

Choose a reason for hiding this comment

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

LGTM! (with the caveat that my familiarity with the vs-code lsp library is limited)

@friedbrice friedbrice merged commit 3e285d2 into main Feb 1, 2024
1 check passed
@friedbrice friedbrice deleted the daniel/fix-language-server branch February 1, 2024 22:32
Copy link

github-actions bot commented Feb 1, 2024

A PR to release these changes has been created, bumping the version from 2.0.2 to 2.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants