microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.05k stars 29.23k forks source link

Dynamically adjust language's extensions+filenames #181169

Closed cjhopman closed 1 year ago

cjhopman commented 1 year ago

I'm working on a language extension for an embeddable programming language (https://github.com/facebookexperimental/starlark-rust). Different embedders of this language will have different patterns that they use for their files. I'd like to make the extensions associated with the language be user configurable, but I can't find a way to specify the extension/filenames except in the extension manifest.

IllusionMH commented 1 year ago

"make the extensions associated with the language be user configurable" if you mean file extensions can already be achieved by users setting files.associations. Have you considered using this setting?

If extension provides required languages than initial implementation it can be docs with setting to copy-paste example configuration. IIRC extensions have an API to update settings, so it should be possible to provide simple action to set configuration by user action if needed.