Commit Graph

12 Commits

Author SHA1 Message Date
Alex Hoppen
d8e0fff6da Make background indexing a proper option in SourceKitLSPOptions
This allows us to flip the default in the future more easily. It also allows users to disable background indexing when it’s enabled by default.

rdar://130280855
2024-06-28 10:23:29 +02:00
Alex Hoppen
3003fe19e5 Allow prefixing of the token for a WorkDoneProgress with a custom string
This allows VS Code to detect when sourcekitd has crashed and prompt the user to gather a diagnostic report + file an issue about the crash.

rdar://129678779
Fixes #1476
2024-06-20 09:05:18 -07:00
Alex Hoppen
60d2876fbc Add workaround for rdar://116221716 2024-06-14 17:43:59 -07:00
Alex Hoppen
3fc03e9f0d Debounced the Reloading Package work done progress 2024-06-08 14:36:20 -07:00
Alex Hoppen
5bf62339cd Debounce the creation of work done progress for indexing
This avoids us from showing a work done progress for short-lived index tasks that take less than a second.

Fixes #1298
rdar://128071328
2024-06-08 14:36:06 -07:00
Alex Hoppen
b479b2e874 Create a SwiftExtensions module
This allows us to share common Swift utility functions between SourceKit-LSP and LSPLogging.
2024-06-04 07:06:44 -07:00
Alex Hoppen
ecacd7ba2c Show work done progress while a source file is being prepared for editor functionality
While `SemanticIndexManager.inProgressPrepareForEditorTask` is not `nil`, show a work done progress in the editor that the current file is being prepared for editor functionality.

I decided to use the indexing progress indicator for this for now because I think it’s too spammy if SourceKit-LSP has two different progress indicators for preparation and indexing. I’ll need to see how this feels like in practice.

rdar://128722609
2024-05-25 10:40:35 -07:00
Alex Hoppen
60864fe864 Respect failed work done progress creation
When the client replies with an error to the `CreateWorkDoneProgressRequest`, we shouldn’t be sending updates for it.
2024-05-22 10:55:57 -07:00
Alex Hoppen
d70a68f37c Wait until initialization has finished before starting a work done progress 2024-05-14 06:38:22 -07:00
Alex Hoppen
4b5f7ffd90 Rename SourceKitServer -> SourceKitLSPServer
This avoid ambiguities whether `SourceKitServer` handles sourcekitd or `sourcekit-lsp`.
2024-03-20 22:50:34 +01:00
Alex Hoppen
252cccc420 Don’t send WorkDoneProgressRequest to the client if it doesn’t support work done progress 2024-03-19 14:38:18 +01:00
Alex Hoppen
ff32570b08 Show an indicator in the client if sourcekitd has crashed
This allows us to prompt the user to file an issue. It’s also useful for developers of sourcekit-lsp to indicate why semantic functionality is limited.

rdar://123391260
2024-02-28 09:53:37 -08:00