Skip to content

VS Code Extension Config API #18476

@alexander-heimbuch

Description

@alexander-heimbuch

Our VS Code extension integrates with the Rust Analyzer extension. In order for Rust Analyzer to work in our environment, it needs dynamic values in the configuration. So far we update the settings.json according to the dynamic values, but this leads to overwriting any configurations of the user and leaving the workspace in a potential dirty state. Accordingly, a different configuration interface would be desirable.

VS Code Extensions offer the possibility to expose an API via the activate hook, here a config function could be added, which enables a configuration in an extension to extension communication:

const rustAnalyzer = vscode.extensions.getExtension("rust-lang.rust-analyzer")?.exports;

await rustAnalyzer.config({ ... });

This function should respect the existing configuration (user configurations have precedence).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-configconfigurationA-vscodevscode plugin issuesC-featureCategory: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions