lspeasy / core/src / createIncrementalDidChangeParams
Function: createIncrementalDidChangeParams()
ts
function createIncrementalDidChangeParams(
uri,
changes,
source): DidChangeTextDocumentParams;Defined in: packages/core/src/utils/document.ts:147
Builds DidChangeTextDocumentParams for an incremental (range-based) document change notification.
Parameters
| Parameter | Type | Description |
|---|---|---|
uri | string | The document URI. |
changes | IncrementalChange[] | One or more range-based text changes. |
source | VersionSource | Either an explicit version number or a tracker instance. |
Returns
DidChangeTextDocumentParams
A DidChangeTextDocumentParams ready to send.
Remarks
Use when the client tracks individual edits (e.g. single-character insertions, deletions) rather than sending the full document text on each change. Requires the server to have textDocumentSync.change = Incremental.
Throws
If neither version nor tracker is provided.