csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

VSCode 1.9.0 - Diagnostics always showing even when ext is not the formatter

Open scabana opened this issue 1 year ago • 4 comments

Environments

  • IDE Version: vscode 1.95
  • Extension Version: 1.9.0
  • CSharpier Version: 0.30.3 will NOT be the same as the extension version
  • Operating System: windows 11
  • .csharpierrc Settings: none
  • .editorconfig Settings: none

Log Output

Steps to reproduce

  1. Install csharpier dotnet tool globally
  2. Install vscode extension
  3. Do not make csharpier the default formatter
  4. Open a project
  5. Open a cs file

Expected behavior

When CSharpier is not the selected formatter, no diagnostics should show up.

When adopting CSharpier, not all repositories will have CSharpier setup.

Actual behavior

CSharpier diagnostics shows up (seems related to this commit

scabana avatar Dec 09 '24 19:12 scabana

I've added an option to disable this for now. I think It makes sense to disable these diagnostics when csharpier is not the formatter.

@badsyntax do you happen to know how to find the current formatter? I was thinking it would be quick to make this change but wasn't able to track down how to get that information in an extension.

belav avatar Dec 09 '24 23:12 belav

This is awesome! I think keeping the option in the long run might even be a good thing. For the little I saw the result, is really was in my way.

scabana avatar Dec 10 '24 00:12 scabana

@belav I'll take a look later this week

badsyntax avatar Dec 10 '24 08:12 badsyntax

Nice solution. I agree with @scabana that the option should be left.

alex-de-haas avatar Dec 11 '24 07:12 alex-de-haas