Closed ahoppen closed 2 weeks ago
The logging of LSP output is internal to the VSCode language client. We don't have control over this. I checked to see if we could catch log messages via a middleware but that doesn't seem possible either.
I think @award999 had some ideas of how to capture the log output.
Ya we can't hook into the middleware but should be able to set an notification handler, I'll take a look next week and make sure works as I expect it to
For verification need to enable background indexing https://github.com/apple/sourcekit-lsp/blob/main/Documentation/Enable%20Experimental%20Background%20Indexing.md
Verified with e8308d6
https://github.com/apple/sourcekit-lsp/pull/1398 adds an LSP extension to set a
logName
in thewindow/logMessage
notifications. It would be great if the VS Code extension could write log messages that havelogName
set to an output view with that name. This would ensure that the index log does not get interleaved with other logs from SourceKit-LSP such as stderr messages or the message trace if verbose logging is enabled in the Swift extension.