Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding names to literal types #1308

Merged
merged 10 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,864 changes: 2,035 additions & 1,829 deletions protocol/metaModel.json

Large diffs are not rendered by default.

48 changes: 30 additions & 18 deletions protocol/src/common/protocol.foldingRange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,34 @@ import type {

// ---- capabilities

/**
* @since 3.18.0
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
* @proposed
*/
export interface ClientFoldingRangeKindOptions {
/**
* The folding range kind values the client supports. When this
* property exists the client also guarantees that it will
* handle values outside its set gracefully and falls back
* to a default value when unknown.
*/
valueSet?: FoldingRangeKind[];
}

/**
* @since 3.18.0
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
* @proposed
*/
export interface ClientFoldingRangeOptions {
/**
* If set, the client signals that it supports setting collapsedText on
* folding ranges to display custom labels instead of the default text.
*
* @since 3.17.0
*/
collapsedText?: boolean;
}

export interface FoldingRangeClientCapabilities {

/**
Expand Down Expand Up @@ -42,30 +70,14 @@ export interface FoldingRangeClientCapabilities {
*
* @since 3.17.0
*/
foldingRangeKind?: {
/**
* The folding range kind values the client supports. When this
* property exists the client also guarantees that it will
* handle values outside its set gracefully and falls back
* to a default value when unknown.
*/
valueSet?: FoldingRangeKind[];
};
foldingRangeKind?: ClientFoldingRangeKindOptions;

/**
* Specific options for the folding range.
*
* @since 3.17.0
*/
foldingRange?: {
/**
* If set, the client signals that it supports setting collapsedText on
* folding ranges to display custom labels instead of the default text.
*
* @since 3.17.0
*/
collapsedText?: boolean;
};
foldingRange?: ClientFoldingRangeOptions;
}

/**
Expand Down
18 changes: 11 additions & 7 deletions protocol/src/common/protocol.inlayHint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './m

import type { StaticRegistrationOptions, TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams } from './protocol';

/**
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
* @since 3.18.0
* @proposed
*/
export interface ClientInlayHintResolveOptions {
/**
* The properties that a client can resolve lazily.
*/
properties: string[];
}
/**
* Inlay hint client capabilities.
*
Expand All @@ -25,13 +35,7 @@ export type InlayHintClientCapabilities = {
* Indicates which properties a client can resolve lazily on an inlay
* hint.
*/
resolveSupport?: {

/**
* The properties that a client can resolve lazily.
*/
properties: string[];
};
resolveSupport?: ClientInlayHintResolveOptions;
};

/**
Expand Down
167 changes: 106 additions & 61 deletions protocol/src/common/protocol.notebook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,51 @@ export type VersionedNotebookDocumentIdentifier = {
uri: URI;
};

/**
* @since 3.18.0
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
* @proposed
*/
export interface NotebookCellLanguage {
language: string;
}

/**
* @since 3.18.0
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
* @proposed
*/
export interface NotebookDocumentFilterWithNotebook {
/**
* The notebook to be synced If a string
* value is provided it matches against the
* notebook type. '*' matches every notebook.
*/
notebook: string | NotebookDocumentFilter;

/**
* The cells of the matching notebook to be synced.
*/
cells?: NotebookCellLanguage[];
}


/**
* @since 3.18.0
* @proposed
*/
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
export interface NotebookDocumentFilterWithCells {
/**
* The notebook to be synced If a string
* value is provided it matches against the
* notebook type. '*' matches every notebook.
*/
notebook?: string | NotebookDocumentFilter;

/**
* The cells of the matching notebook to be synced.
*/
cells: NotebookCellLanguage[];
}

/**
* Options specific to a notebook plus its cells
* to be synced to the server.
Expand All @@ -313,31 +358,7 @@ export type NotebookDocumentSyncOptions = {
/**
* The notebooks to be synced
*/
notebookSelector: ({
/**
* The notebook to be synced If a string
* value is provided it matches against the
* notebook type. '*' matches every notebook.
*/
notebook: string | NotebookDocumentFilter;

/**
* The cells of the matching notebook to be synced.
*/
cells?: { language: string }[];
} | {
/**
* The notebook to be synced If a string
* value is provided it matches against the
* notebook type. '*' matches every notebook.
*/
notebook?: string | NotebookDocumentFilter;

/**
* The cells of the matching notebook to be synced.
*/
cells: { language: string }[];
})[];
notebookSelector: (NotebookDocumentFilterWithNotebook | NotebookDocumentFilterWithCells)[];

/**
* Whether save notification should be forwarded to
Expand Down Expand Up @@ -428,6 +449,65 @@ export namespace NotebookCellArrayChange {
}
}

/**
* Structural changes to cells in a notebook document.
*
* @since 3.18.0
* @proposed
*/
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
export interface NotebookDocumentCellChangeStructure {
/**
* The change to the cell array.
*/
array: NotebookCellArrayChange;

/**
* Additional opened cell text documents.
*/
didOpen?: TextDocumentItem[];

/**
* Additional closed cell text documents.
*/
didClose?: TextDocumentIdentifier[];
}

/**
* Content changes to a cell in a notebook document.
*
* @since 3.18.0
* @proposed
*/
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
export interface NotebookDocumentCellContentChanges {
document: VersionedTextDocumentIdentifier;
changes: TextDocumentContentChangeEvent[];
}

/**
* Cell changes to a notebook document.
*
* @since 3.18.0
* @proposed
*/
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
export interface NotebookDocumentCellChanges {
/**
* Changes to the cell structure to add or
* remove cells.
*/
structure?: NotebookDocumentCellChangeStructure;

/**
* Changes to notebook cells properties like its
* kind, execution summary or metadata.
*/
data?: NotebookCell[];

/**
* Changes to the text content of notebook cells.
*/
textContent?: NotebookDocumentCellContentChanges[];
}

/**
* A change event for a notebook document.
*
Expand All @@ -444,42 +524,7 @@ export type NotebookDocumentChangeEvent = {
/**
* Changes to cells
*/
cells?: {
/**
* Changes to the cell structure to add or
* remove cells.
*/
structure?: {
/**
* The change to the cell array.
*/
array: NotebookCellArrayChange;

/**
* Additional opened cell text documents.
*/
didOpen?: TextDocumentItem[];

/**
* Additional closed cell text documents.
*/
didClose?: TextDocumentIdentifier[];
};

/**
* Changes to notebook cells properties like its
* kind, execution summary or metadata.
*/
data?: NotebookCell[];

/**
* Changes to the text content of notebook cells.
*/
textContent?: {
document: VersionedTextDocumentIdentifier;
changes: TextDocumentContentChangeEvent[];
}[];
};
cells?: NotebookDocumentCellChanges;
};

/**
Expand Down
77 changes: 49 additions & 28 deletions protocol/src/common/protocol.semanticTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,39 @@ export namespace TokenFormat {

export type TokenFormat = 'relative';


/**
* @since 3.18.0
* @proposed
*/
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
export interface ClientSemanticTokensRequestFullDelta {
/**
* The client will send the `textDocument/semanticTokens/full/delta` request if
* the server provides a corresponding handler.
*/
delta?: boolean;
}

/**
* @since 3.18.0
* @proposed
*/
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
export interface ClientSemanticTokensRequestOptions {

/**
* The client will send the `textDocument/semanticTokens/range` request if
* the server provides a corresponding handler.
*/
range?: boolean | {
};

/**
* The client will send the `textDocument/semanticTokens/full` request if
* the server provides a corresponding handler.
*/
full?: boolean | ClientSemanticTokensRequestFullDelta;
}

/**
* @since 3.16.0
*/
Expand All @@ -54,28 +87,7 @@ export interface SemanticTokensClientCapabilities {
* range provider the client might not render a minimap correctly or might
* even decide to not show any semantic tokens at all.
*/
requests: {

/**
* The client will send the `textDocument/semanticTokens/range` request if
* the server provides a corresponding handler.
*/
range?: boolean | {
};

/**
* The client will send the `textDocument/semanticTokens/full` request if
* the server provides a corresponding handler.
*/
full?: boolean | {

/**
* The client will send the `textDocument/semanticTokens/full/delta` request if
* the server provides a corresponding handler.
*/
delta?: boolean;
};
};
requests: ClientSemanticTokensRequestOptions;

/**
* The token types that the client supports.
Expand Down Expand Up @@ -127,6 +139,20 @@ export interface SemanticTokensClientCapabilities {
augmentsSyntaxTokens?: boolean;
}


/**
* Semantic tokens options to support deltas for full documents
*
* @since 3.18.0
* @proposed
*/
karthiknadig marked this conversation as resolved.
Show resolved Hide resolved
export interface SemanticTokensFullDelta {
/**
* The server supports deltas for full documents.
*/
delta?: boolean;
}

/**
* @since 3.16.0
*/
Expand All @@ -146,12 +172,7 @@ export interface SemanticTokensOptions extends WorkDoneProgressOptions {
/**
* Server supports providing semantic tokens for a full document.
*/
full?: boolean | {
/**
* The server supports deltas for full documents.
*/
delta?: boolean;
};
full?: boolean | SemanticTokensFullDelta;
}

/**
Expand Down
Loading