cake-build / cake-vscode

Contains Cake extension for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=cake-build.cake-vscode
MIT License
42 stars 33 forks source link

IntelliSense using the new LSP version of vscode-csharp? #853

Closed KatoStoelen closed 1 year ago

KatoStoelen commented 1 year ago

Is there any way of getting IntelliSense working using the new LSP version of vscode-csharp (>= v2.0) where OmniSharp is no longer used? Or would one have to re-enable OmniSharp for that to work?

nils-a commented 1 year ago

@devlead has had some first-hand contact with the new version, so he might have some insights.

As far as I know, there is no way to make this work, since in the new version Microsoft has dropped all support for external/non-ms/whatever integrations.

KatoStoelen commented 1 year ago

... Microsoft has dropped all support for external/non-ms/whatever integrations.

😬 I see.

Thanks for the quick feedback!

nils-a commented 1 year ago

There was some hint of "things to come" but that's in the future, for now.

See https://twitter.com/timheuer/status/1710689194203394392?t=MXWzLaMZ9rOavCo3oXvHqQ&s=19 or, more directly, https://github.com/dotnet/roslyn/issues/68696

KatoStoelen commented 1 year ago

🤞🏼

devlead commented 1 year ago

So currently all APIs in DevKit are for Microsoft internal use only, reached out to @timheuer and he pointed us to this as on of the issues for tracking progress in that area https://github.com/dotnet/roslyn/issues/68696

OmniSharp isn't on by default since they shipped C# DevKit, but you can turn it on.

Try in your workspace adding settings

"dotnet.preferCSharpExtension": true,
"dotnet.server.useOmnisharp": true

Then reinstall cake intellisense and restart Code, then OmniSharp project selection should work. This way you can for one workspace/repo opt-in to OmniSharp, but use DevKit for all others as default.