For an extension I am working on, our end-users would prefer to have options such as word-wrap on by default. We would like to be able to set this at the language level without the user's direct involvement (just for the languages our extension is active for). I am aware of the per language settings. My goal is to set settings such as the following:
"[xml]": {
"editor.wordWrap": "on",
"editor.tabSize": 4
},
without the user have to do so in their own user settings. Is there a way to do this via the Extension API? I am not seeing any obvious ways to do so.
PS The LanguageConfiguration object does not seem to be relevant for setting things like word-wrap.
Yes, extensions can contribute default editor settings for a language using configurationDefaults
in the package.json
Here's what the builtin markdown extension contributes for example:
{
"name": "vscode-markdown",
...,
"contributes": {
"configurationDefaults": {
"[markdown]": {
"editor.wordWrap": "on",
"editor.quickSuggestions": false
}
}
}
}
This currently only supports editor.*
language specific settings. We are tracking support for contributing additional language specific settings here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With