Skip to content

[VSCode Extension] Allows to deactivate diagnostics only for XML files #1663

@sharky98

Description

@sharky98

Environments

  • IDE Version: VSCode 1.102.0
  • Extension Version: 2.0.8
  • CSharpier Version: 1.0.3
  • Operating System: Linux
  • .csharpierrc Settings: none
  • .editorconfig Settings: none

Expected behavior

Since I use another VSCode extension for XML (DotJoshJohnson.xml), diagnostic warnings from CSharpier should not appear on XML files.

I was expecting to be able to configure it with the following (note that another formatter is configured for XML).

"[xml]": {
    "editor.defaultFormatter": "DotJoshJohnson.xml",
    "csharpier.enableDiagnostics": false
},
"[csharp]": {
    "editor.defaultFormatter": "csharpier.csharpier-vscode"
},

Actual behavior

  • Using "csharpier.enableDiagnostics": false inside the [xml] key return This setting cannot be applied because it is not registered as language override setting..
  • Using "csharpier.enableDiagnostics": false globally also disable diagnostics for C# files, even though the description seems to indicate otherwise ("code that is not formatted with CSharpier", since I am using CSharpier to format C#, I was expecting the diagnostics to stay).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions