Skip to content

lspeasy / core/src / createFullDidChangeParams

Function: createFullDidChangeParams()

ts
function createFullDidChangeParams(
   uri, 
   text, 
   source): DidChangeTextDocumentParams;

Defined in: packages/core/src/utils/document.ts:181

Builds DidChangeTextDocumentParams for a full-document text replacement.

Parameters

ParameterTypeDescription
uristringThe document URI.
textstringThe complete new document text.
sourceVersionSourceEither an explicit version number or a tracker instance.

Returns

DidChangeTextDocumentParams

A DidChangeTextDocumentParams ready to send.

Remarks

Use when the server only supports full-text synchronisation (textDocumentSync.change = Full) or when tracking individual edits is impractical (e.g. clipboard paste of a large file).

Throws

If neither version nor tracker is provided.

Released under the MIT License.