mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 11:10:48 +00:00
add an API proposal for DocumentFilter#notebookType
, https://github.com/microsoft/vscode/issues/141143
This commit is contained in:
parent
b239683e79
commit
609eea3a30
5 changed files with 24 additions and 1 deletions
|
@ -223,6 +223,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
|||
if (typeof filter.exclusive === 'boolean') {
|
||||
checkProposedApiEnabled(extension, 'documentFiltersExclusive');
|
||||
}
|
||||
if (typeof filter.notebookType === 'string') {
|
||||
checkProposedApiEnabled(extension, 'notebookDocumentSelector');
|
||||
}
|
||||
}
|
||||
return selector;
|
||||
};
|
||||
|
|
|
@ -336,6 +336,7 @@ export interface IDocumentFilterDto {
|
|||
scheme?: string;
|
||||
pattern?: string | IRelativePattern;
|
||||
exclusive?: boolean;
|
||||
notebookType?: string;
|
||||
}
|
||||
|
||||
export interface ISignatureHelpProviderMetadataDto {
|
||||
|
|
|
@ -148,7 +148,8 @@ export namespace DocumentSelector {
|
|||
language: selector.language,
|
||||
scheme: _transformScheme(selector.scheme, uriTransformer),
|
||||
pattern: GlobPattern.from(selector.pattern) ?? undefined,
|
||||
exclusive: selector.exclusive
|
||||
exclusive: selector.exclusive,
|
||||
notebookType: selector.notebookType
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ export const allApiProposals = Object.freeze({
|
|||
notebookControllerKind: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerKind.d.ts',
|
||||
notebookDebugOptions: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDebugOptions.d.ts',
|
||||
notebookDeprecated: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDeprecated.d.ts',
|
||||
notebookDocumentSelector: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDocumentSelector.d.ts',
|
||||
notebookEditor: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookEditor.d.ts',
|
||||
notebookEditorDecorationType: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookEditorDecorationType.d.ts',
|
||||
notebookEditorEdit: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookEditorEdit.d.ts',
|
||||
|
|
17
src/vscode-dts/vscode.proposed.notebookDocumentSelector.d.ts
vendored
Normal file
17
src/vscode-dts/vscode.proposed.notebookDocumentSelector.d.ts
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/141143
|
||||
|
||||
export interface DocumentFilter {
|
||||
|
||||
/**
|
||||
* The {@link NotebookDocument.notebookType type} of a notebook, like `jupyter`
|
||||
*/
|
||||
readonly notebookType?: string;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue