Rob
Rob

Reputation: 7099

Is it possible to have intellisense in VSCode show the return type?

I've switched from MonoDevelop to VSCode for C# development for Unity3d. The intellisence provided by MonoDevelop IMO was more informative.

As you type MonoDevelop gives you useful things like whether the item in the list is a method, property or primitive etc and also the return type. VSCode does not do this, here's an example of the as you type completion.

//edit I cannot use Visual Studio as I'm using Mac OSX. Switching to Windows bootcamp just for Unity is not convenient or productive.

VSCode

VSCode Completion

MonoDevelop

MD Completion

Upvotes: 2

Views: 1732

Answers (1)

Rob
Rob

Reputation: 7099

Autocomplete is largely driven by the Omnisharp extension for VSCode.

Due to issues with compatibility of Unity extensions the latest c# extensions for VSCode it's required that for Unity3d development the legacy C# extension is used.

The Legacy c# extension uses an old version of Omnisharp that does not have a very up-to-date feature set for autocomplete.

Return type has been added to more recent versions of Omnisharp.

//Edit

It's now recommended to use the latest C# extension of VSCode, the Legacy is no longer required for Unity Development so we can now benefit from improved Omnisharp integration in VSCode when developing for Unity3d. Yay!

Upvotes: 2

Related Questions