You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an experimental request to pause background indexing
This request allows IDEs to disable SourceKit-LSP’s background indexing functionality when it requires all compute resources for other, more interactive, tasks.
Copy file name to clipboardExpand all lines: Contributor Documentation/LSP Extensions.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -451,13 +451,38 @@ logName?: string;
451
451
452
452
New request to wait until the index is up-to-date.
453
453
454
+
> [!IMPORTANT]
455
+
> This request is experimental and may be modified or removed in future versions of SourceKit-LSP without notice. Do not rely on it.
456
+
454
457
- params: `PollIndexParams`
455
458
- result: `void`
456
459
457
460
```ts
458
461
exportinterfacePollIndexParams {}
459
462
```
460
463
464
+
## `workspace/_setOptions`
465
+
466
+
New request to modify runtime options of SourceKit-LSP.
467
+
468
+
Any options not specified in this request will be left as-is.
469
+
470
+
> [!IMPORTANT]
471
+
> This request is experimental, guarded behind the `set-options-request` experimental feature, and may be modified or removed in future versions of SourceKit-LSP without notice. Do not rely on it.
472
+
473
+
- params: `SetOptionsParams`
474
+
- result: `void`
475
+
476
+
```ts
477
+
exportinterfaceSetOptionsParams {
478
+
/**
479
+
* `true` to pause background indexing or `false` to resume background indexing.
480
+
*/
481
+
backgroundIndexingPaused?: bool;
482
+
}
483
+
```
484
+
485
+
461
486
## `workspace/getReferenceDocument`
462
487
463
488
Request from the client to the server asking for contents of a URI having a custom scheme.
Copy file name to clipboardExpand all lines: Documentation/Configuration File.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ The structure of the file is currently not guaranteed to be stable. Options may
55
55
-`noLazy`: Prepare a target without generating object files but do not do lazy type checking and function body skipping. This uses SwiftPM's `--experimental-prepare-for-indexing-no-lazy` flag.
56
56
-`enabled`: Prepare a target without generating object files.
57
57
-`cancelTextDocumentRequestsOnEditAndClose: boolean`: Whether sending a `textDocument/didChange` or `textDocument/didClose` notification for a document should cancel all pending requests for that document.
58
-
-`experimentalFeatures: ("on-type-formatting")[]`: Experimental features that are enabled.
58
+
-`experimentalFeatures: ("on-type-formatting"|"set-options-request")[]`: Experimental features that are enabled.
59
59
-`swiftPublishDiagnosticsDebounceDuration: number`: The time that `SwiftLanguageService` should wait after an edit before starting to compute diagnostics and sending a `PublishDiagnosticsNotification`.
60
60
-`workDoneProgressDebounceDuration: number`: When a task is started that should be displayed to the client as a work done progress, how many milliseconds to wait before actually starting the work done progress. This prevents flickering of the work done progress in the client for short-lived index tasks which end within this duration.
61
61
-`sourcekitdRequestTimeout: number`: The maximum duration that a sourcekitd request should be allowed to execute before being declared as timed out. In general, editors should cancel requests that they are no longer interested in, but in case editors don't cancel requests, this ensures that a long-running non-cancelled request is not blocking sourcekitd and thus most semantic functionality. In particular, VS Code does not cancel the semantic tokens request, which can cause a long-running AST build that blocks sourcekitd.
0 commit comments