-
Notifications
You must be signed in to change notification settings - Fork 40
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
Enable new LSP tracing capability #29
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the activationEvents
change is necessary, but looks good otherwise
package.json
Outdated
@@ -235,7 +246,7 @@ | |||
] | |||
}, | |||
"activationEvents": [ | |||
"workspaceContains:.hhconfig" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Hack workspaces need to have a .hhconfig
file at root, so this is a good indicator for activating the extension. This way functionality like typechecking and linting can start in the background without needing to open any file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. The key thing from a VS Code perspective is perf. We commend only starting the LSP when it's strictly needed, so you might reconsider to have multiple activation contexts.
@@ -224,6 +224,17 @@ | |||
}, | |||
"default": {}, | |||
"description": "Workspaces where whether or not to run custom Hack executables (e.g. hhast-lint) has been remembered" | |||
}, | |||
"hack.trace.server": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this config read by vscode automatically? (I don't see it used anywhere)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an implicit feature of the languageclient. See https://github.com/Microsoft/vscode-languageserver-node/blob/master/client/src/client.ts#L2872
This reverts commit 32a548d.
Activation changed reverted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR enables our new LSP tracing capability, which creates an output channel in VS Code that allows easy inspection of the LSP traffic, which can be analyzed with https://microsoft.github.io/language-server-protocol/inspector/.
See microsoft/language-server-protocol-inspector#8 + octref/lsp-inspector#8
Changes
new hack.tracing.server
optionhack
as it's use as the namespace for the trace setting