Closed WhiteBlackGoose closed 1 year ago
Hi @WhiteBlackGoose, sorry for the slow response, it's tricky to find a spare moment at this time of year.
When I open your example program in OmniSharp-vim, I do get ALE diagnostics from the analyzer, and you can see them here listed in the quickfix list as the result of running :OmniSharpGlobalCodeCheck
.
My dotnet --info
looks like this:
❯ dotnet --info
.NET SDK:
Version: 7.0.101
Commit: bb24aafa11
Runtime Environment:
OS Name: pop
OS Version: 22.04
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/7.0.101/
Host:
Version: 7.0.1
Architecture: x64
Commit: 97203d38ba
.NET SDKs installed:
6.0.404 [/usr/share/dotnet/sdk]
7.0.100-preview.4.22252.9 [/usr/share/dotnet/sdk]
7.0.101 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.12 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0-preview.4.22251.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.12 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0-preview.4.22229.4 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
DOTNET_ROOT [/usr/lib/dotnet/dotnet6-6.0.108]
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
I installed the dotnet 7 dependencies with sudo apt install dotnet-runtime-7.0 dotnet-runtime-deps-7.0 dotnet-sdk-7.0
on Pop_OS!, which is derived from Ubuntu which is derived from Debian, so I'm not sure if you'd have the same packages available exactly but maybe?
sorry for the slow response, it's tricky to find a spare moment at this time of year
This is no problem, happy holidays!
I installed the dotnet 7 dependencies with sudo apt install dotnet-runtime-7.0 dotnet-runtime-deps-7.0 dotnet-sdk-7.0 on Pop_OS!, which is derived from Ubuntu which is derived from Debian, so I'm not sure if you'd have the same packages available exactly but maybe?
.NET is not packaged for debian, so I used zip archives. Hmmm
Oh right I'm using a PPA, sorry. I can find it later but it's the Microsoft one so should be easy enough to find
@WhiteBlackGoose I think you just follow the dotnet 7 installation instructions here (download and install a .deb from Microsoft):
https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian
oops, I moved to NixOS recently :smile:
I'll let you know if it works for nix as soon as I get SDK to work (am trying to, right now)
Tried using my repro. Still doesn't work for me (still no desired diagnostics). Tried with TFM=net6 because omnisharp-roslyn is packed with it (I'll package it with .net 7 when I'll have time)
Hi @WhiteBlackGoose, I just realised that I have EnableAnalyzersSupport: true
in my global omnisharp.json
config, and perhaps that's the missing key here. I don't know why it isn't set to true
by default. So if you don't already have it, try creating a ~/.omnisharp/omnisharp.json
file with the following contents:
{
"FormattingOptions": {
"EnableEditorConfigSupport": true
},
"RoslynExtensionsOptions": {
"EnableAnalyzersSupport": true
}
}
For more info see: https://github.com/OmniSharp/omnisharp-roslyn/wiki/Configuration-Options#roslyn-extensions-options
Aye, that worked! Thank you so much!
Hello, and thanks for this amazing plugin.
For some reason, cannot get roslyn analyzers to work.
Repro:
and
Program.cs
:Tried net6 and net7 as TFM.
If you use
dotnet build
, it will complain about new API added. But no linting in the editorSoftware versions
Latest
omnisharp-vim
and latest O# server