Repository navigation
v8 - Add a way to push all available configurations (additively) #74
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,8 @@ export declare enum Version { | |
| v5 = 5, | ||
| v6 = 6, | ||
| v7 = 7, | ||
| latest = 7 | ||
| v8 = 8, | ||
| latest = 8 | ||
| } | ||
| export type CStandard = "c89" | "c99" | "c11" | "c17" | "c23"; | ||
| export type GnuCStandard = "gnu89" | "gnu99" | "gnu11" | "gnu17" | "gnu23"; | ||
|
|
@@ -45,7 +46,7 @@ export interface CppToolsApi extends vscode.Disposable { | |
| */ | ||
| notifyReady(provider: CustomConfigurationProvider): void; | ||
| /** | ||
| * Notify the C/C++ extension that the current configuration has changed. Upon receiving this | ||
| * Notify the C/C++ extension that the current set of configurations has changed. Upon receiving this | ||
| * notification, the C/C++ extension will request the new configurations. | ||
| * @param provider An instance of the [CustomConfigurationProvider](#CustomConfigurationProvider) | ||
| * instance representing the provider extension. | ||
|
|
@@ -58,6 +59,16 @@ export interface CppToolsApi extends vscode.Disposable { | |
| * instance representing the provider extension. | ||
| */ | ||
| didChangeCustomBrowseConfiguration(provider: CustomConfigurationProvider): void; | ||
| /** | ||
| * Push IntelliSense configurations for source files. | ||
| * A provider should push all custom configurations available, as soon as they are available, | ||
| * to support features such as whole codebase symbol indexing and for an accurate include graph. | ||
| * Configurations are additive. Call `didChangeCustomConfiguration` to clear all configurations. | ||
|
Colengms marked this conversation as resolved.
Resolved
|
||
| * @param provider An instance of the [CustomConfigurationProvider](#CustomConfigurationProvider) | ||
| * instance representing the provider extension. | ||
| * @param items A list of [SourceFileConfigurationItem](#SourceFileConfigurationItem) representing the source files and their configurations. | ||
| */ | ||
| provideConfigurations(provider: CustomConfigurationProvider, items: SourceFileConfigurationItem[]): void; | ||
| } | ||
| /** | ||
| * An interface to allow this extension to communicate with Custom Configuration Provider extensions. | ||
|
|
@@ -189,7 +200,7 @@ export interface SourceFileConfigurationItem { | |
| }; | ||
| ``` | ||
| */ | ||
| readonly uri: string | vscode.Uri; | ||
| readonly uri: string | vscode.Uri | (string | vscode.Uri)[]; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't like the idea of having this accept an array. It would be better to have a separate object for configurations that apply to multiple files.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keeping the shared item type lets a v8 provider return grouped configurations for a related project through the existing request callback when one file becomes relevant, as well as push them unsolicited. Existing providers can continue returning single-URI items; array-valued URIs require negotiated v8 support. Leaving this thread open for the type-shape discussion. |
||
| /** | ||
| * The IntelliSense configuration for [uri](#SourceFileConfigurationItem.uri) | ||
| */ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.