diff --git a/_specifications/lsp/3.17/notebookDocument/notebook.md b/_specifications/lsp/3.17/notebookDocument/notebook.md index 216227a..710551d 100644 --- a/_specifications/lsp/3.17/notebookDocument/notebook.md +++ b/_specifications/lsp/3.17/notebookDocument/notebook.md @@ -281,6 +281,15 @@ export interface NotebookDocumentSyncClientCapabilities { * The client supports sending execution summary data per cell. */ executionSummarySupport?: boolean; + + /** + * The client supports the `textContentSyncKind` property on + * `NotebookDocumentSyncOptions` to indicate how cell text content + * should be synchronized. + * + * @since 3.18.0 + */ + textContentSyncKindSupport?: boolean; } ``` @@ -344,6 +353,26 @@ export interface NotebookDocumentSyncOptions { * the server. Will only be honored if mode === `notebook`. */ save?: boolean; + + /** + * How cell text content should be synced to the server. If omitted, + * cell text content is sent in full for every change. + * + * If `TextDocumentSyncKind.Full`, the client MUST send the full + * content of the cell on every change. Ranged updates (incremental + * synchronization) MUST NOT be used. + * + * If `TextDocumentSyncKind.Incremental`, the client SHOULD send + * ranged (incremental) updates when possible, but MAY send full + * content updates. This mirrors the behavior of `textDocumentSync.change`. + * + * Clients that advertise `textContentSyncKindSupport` in their + * capabilities MUST honor the `textContentSyncKind` value and send + * cell text changes accordingly. + * + * @since 3.18.0 + */ + textContentSyncKind?: TextDocumentSyncKind; } ``` diff --git a/_specifications/lsp/3.18/notebookDocument/notebook.md b/_specifications/lsp/3.18/notebookDocument/notebook.md index 1ab6f41..1629197 100644 --- a/_specifications/lsp/3.18/notebookDocument/notebook.md +++ b/_specifications/lsp/3.18/notebookDocument/notebook.md @@ -299,6 +299,15 @@ export interface NotebookDocumentSyncClientCapabilities { * The client supports sending execution summary data per cell. */ executionSummarySupport?: boolean; + + /** + * The client supports the `textContentSyncKind` property on + * `NotebookDocumentSyncOptions` to indicate how cell text content + * should be synchronized. + * + * @since 3.18.0 + */ + textContentSyncKindSupport?: boolean; } ``` @@ -362,6 +371,26 @@ export interface NotebookDocumentSyncOptions { * the server. Will only be honored if mode === `notebook`. */ save?: boolean; + + /** + * How cell text content should be synced to the server. If omitted, + * cell text content is sent in full for every change. + * + * If `TextDocumentSyncKind.Full`, the client MUST send the full + * content of the cell on every change. Ranged updates (incremental + * synchronization) MUST NOT be used. + * + * If `TextDocumentSyncKind.Incremental`, the client SHOULD send + * ranged (incremental) updates when possible, but MAY send full + * content updates. This mirrors the behavior of `textDocumentSync.change`. + * + * Clients that advertise `textContentSyncKindSupport` in their + * capabilities MUST honor the `textContentSyncKind` value and send + * cell text changes accordingly. + * + * @since 3.18.0 + */ + textContentSyncKind?: TextDocumentSyncKind; } ``` diff --git a/_specifications/lsp/3.18/specification.md b/_specifications/lsp/3.18/specification.md index 54bdf2e..0fa51ee 100644 --- a/_specifications/lsp/3.18/specification.md +++ b/_specifications/lsp/3.18/specification.md @@ -738,6 +738,7 @@ Since 3.17 there is a meta model describing the LSP protocol: * Support for debug message kind. * Client capability to enumerate properties that can be resolved for code lenses. * Added support for `completionList.applyKind` to determine how values from `completionList.itemDefaults` and `completion` are combined. +* Added support for negotiating cell text synchronization kind in notebook documents via `textContentSyncKind`. #### 3.17.0 (05/10/2022)