OmniSharp / omnisharp-vim

Vim omnicompletion (intellisense) and more for C#
http://www.omnisharp.net
MIT License
1.72k stars 168 forks source link

Omnisharp does not respect .editorconfig roslyn settings #695

Closed RononDex closed 3 years ago

RononDex commented 3 years ago

It appears that the vim plugin for Omnisharp does not respect .editorconfig settings regarding roslyn analysers. I have the following config in my .editorconfig:

csharp_using_directive_placement = outside_namespace:error
dotnet_diagnostic.IDE0008.severity = none

Full .editorconfig see here: https://github.com/RononDex/FitsLibrary/blob/master/.editorconfig

My omnisharp.json:

{
  "RoslynExtensionsOptions": {
    "LocationPaths": ["/home/cobra/.omnisharp/Rozlynator"],
    "enableAnalyzersSupport": true
  },
  "FormattingOptions": {
        "OrganizeImports": true,
        "enableEditorConfigSupport": true
  }
}

Even after restarting the omnisharp server, to ensure it loads the new configuration it still shows errors: image

nickspoons commented 3 years ago

OmniSharp-vim does not read .editorconfig, OmniSharp-roslyn does, so that's a server issue.

OmniSharp-vim does have a mechanism for overriding diagnostics though, see the g:OmniSharp_diagnostic_overrides example in the README

RononDex commented 3 years ago

Thanks, though setting it globally is not a viable solution for me here. Since I want everybody opening the project having the those rules applied