Closed Igorgro closed 2 years ago
These settings currently only enable inlay hints at the VS Code level, but not in OmniSharp server. You need to separately enable them in the server component. In the future they will be synchronized.
For now, the simplest way is to do one of the following:
omnisharp.json
file located in %USERPROFILE%/.omnisharp/
(affects all projects globally)omnisharp.json
file located in the working directory which OmniSharp has been pointed at (affects current project only)in this file, you can enable inlay hints by setting
{
"roslynExtensionsOptions": {
"inlayHintsOptions": {
"enableForParameters": true,
"forLiteralParameters": true,
"forIndexerParameters": true,
"forObjectCreationParameters": true,
"forOtherParameters": true,
"suppressForParametersThatDifferOnlyBySuffix": false,
"suppressForParametersThatMatchMethodIntent": false,
"suppressForParametersThatMatchArgumentName": false,
"enableForTypes": true,
"forImplicitVariableTypes": true,
"forLambdaParameterTypes": true,
"forImplicitObjectCreation": true
}
}
}
More on the server configuration options can be found here https://github.com/OmniSharp/omnisharp-roslyn/wiki/Configuration-Options
Thank you! After applying this settings everything works well.
Thanks for confirming
In the future they will be synchronized
Maybe this issue should be stay opened to track that?
Issue Description
I've enabled inlay hints using the following settings:
but inlay hints don't work and there are number of repated messages in Omnisharp logs
Steps to Reproduce
Expected Behavior
Inlay hints woking for both variable types and argument names
Actual Behavior
In inlay hints are shown
Logs
OmniSharp log
C# log
-
Environment information
VSCode version: 1.66.0 C# Extension: 1.24.3
Mono Information
OmniSharp using built-in monoDotnet Information
Version: 6.0.101 Commit: ef49f6213a Runtime: OS Name: arch OS Version: OS Platform: Linux RID: arch-x64 Base Path: /usr/share/dotnet/sdk/6.0.101/ Host (useful for support): Version: 6.0.1 Commit: 3a25a7f1cc .NET SDKs installed: 5.0.404 [/usr/share/dotnet/sdk] 6.0.101 [/usr/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 5.0.13 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 5.0.13 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-downloadVisual Studio Code Extensions
|Extension|Author|Version| |---|---|---| |ansible|redhat|0.8.1| |beautify|HookyQR|1.5.0| |csharp|ms-dotnettools|1.24.3| |git-graph|mhutchie|1.30.0| |gitlab-workflow|GitLab|3.42.0| |gitlens|eamodio|12.0.5| |gitmoji-vscode|seatonjiang|1.1.2| |hexeditor|ms-vscode|1.9.5| |jupyter|ms-toolsai|2022.3.1000901801| |jupyter-keymap|ms-toolsai|1.0.0| |live-server|ms-vscode|0.2.12| |material-icon-theme|PKief|4.15.0| |material-product-icons|PKief|1.2.0| |python|ms-python|2022.4.0| |resxpress|PrateekMahendrakar|4.5.0| |trailing-spaces|shardulm94|0.3.1| |vscode-docker|ms-azuretools|1.21.0| |vscode-eslint|dbaeumer|2.2.2| |vscode-jest|Orta|4.2.1| |vscode-npm-script|eg2|0.3.24| |vscode-openapi|42Crunch|4.9.3| |vscode-taskexplorer|spmeesseman|2.9.1| |vscode-xml|redhat|0.20.0| |vscode-yaml|redhat|1.6.0| |vscord|LeonardSSH|4.5.0|;