godotengine / godot-csharp-vscode

Debugger and utilities for working with Godot C# projects in VSCode
https://marketplace.visualstudio.com/items?itemName=neikeq.godot-csharp-vscode
MIT License
149 stars 27 forks source link

[MAC] VScode CSharp has no code prompt #36

Open eighteen-k-gold-malow opened 3 years ago

eighteen-k-gold-malow commented 3 years ago

In the MAC operating system, vscode cannot display the intelligent message properly. Add the following two lines in the vscode configuration file to configure the mono compiler path

"omnisharp.useGlobalMono": "always",
"omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/Current"
eighteen-k-gold-malow commented 3 years ago

Please add this description to readme.md before others run into this troublesome problem

raulsntos commented 3 years ago

Those settings are provided by the C# extension. The godot-csharp-vscode extension does not provide autocomplete for C# (only for Node paths, Input actions, Resource paths, Scene paths and Signal names).

Also, I'm not sure we can generalize that the configuration you suggested should always be used, the default for omnisharp.useGlobalMono is auto which should use the global Mono unless it's too outdated, maybe that line is not really necessary and you only really need to configure the omnisharp.monoPath if it can't be found automatically but I would assume the extension should be able to find it automatically unless you are installing Mono in an unconventional path.

In summary, I think the C# extension should not need to be configured to find Mono unless you have a non-conventional setup (in which case that's an issue specific to your setup and can't be recommended as the way to go for most users who I'd assume would be using a conventional setup). There are already some notes in that extension's README.md about this configuration when using .NET Core 3.1.40x or .NET 5 (since MacOS and Linux users may have a version of Mono that is too outdated and those SDKs require MSBuild 16.7 and 16.8 respectively).