vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

How to prevent the extension to create .vscode/settings.json

Open mariomerco opened this issue 5 years ago • 2 comments

I want to prevent that when I open any folder (literally any folder), the extension will create the .vscode/settings.json. Is more or less the same behavior as https://github.com/microsoft/vscode/issues/29251, BUT this one actually adds the yaml.customTags array on it.

The .vscode/settings.json created

{
    "yaml.customTags": [
        "!And",
        "!If",
        "!Not",
        "!Equals",
        "!Or",
        "!FindInMap sequence",
        "!Base64",
        "!Cidr",
        "!Ref",
        "!Sub",
        "!GetAtt",
        "!GetAZs",
        "!ImportValue",
        "!Select",
        "!Select sequence",
        "!Split",
        "!Join sequence",
        "!And sequence",
        "!If sequence",
        "!Not sequence",
        "!Equals sequence",
        "!Or sequence",
        "!FindInMap",
        "!Join",
        "!Sub sequence",
        "!ImportValue sequence",
        "!Split sequence"
    ]
}

This exact same configuration is in my User settings, so I don't see a reason why this is created in any folder I open if I don't want to make it a Workspace setting.

I'm using a Mac with Big Sur (version 11.4) and these are the VS Code details:

Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Date: 2021-08-04T23:14:40.191Z (1 wk ago)
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Darwin x64 20.5.0```

Thanks!

mariomerco avatar Aug 18 '21 20:08 mariomerco

AFAIK we aren't adding anything to yaml.customTags by default, we just create the setting on our side. Do you have a cloudformation or aws extension installed? My guess is that one of those extensions are adding in those tags into yaml.customTags.

In an issue posted yesterday someone had a similiar issue with the AWS Toolkit extension: https://github.com/redhat-developer/vscode-yaml/issues/578

JPinkney avatar Aug 18 '21 21:08 JPinkney

Thanks for responding so quick! you are absolutely right. There's an issue with the AWS Toolkit Extension: https://github.com/aws/aws-toolkit-vscode/pull/1934

Disabled it until it gets updated to see whether that fixes the issue. Thanks!

mariomerco avatar Aug 18 '21 22:08 mariomerco