No IntelliSense & parameter hints for calls to local functions
See original GitHub issueEnvironment data
dotnet --info
output:
.NET Command Line Tools (1.0.1)
Product Information:
Version: 1.0.1
Commit SHA-1 hash: 005db40cd1
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.11
OS Platform: Darwin
RID: osx.10.11-x64
Base Path: /usr/local/share/dotnet/sdk/1.0.1
VS Code version: 1.14.2
C# Extension version: 1.11.0
Steps to reproduce
Create a local function, and make a call to it:
static void main(string[] args)
{
var flag = LocalFunction(1);
bool LocalFunction(int i)
{
return i > 0;
}
}
Expected behavior
-
When typing arguments for the call to the local function, in
var flag = LocalFunction(1);
, IntelliSense should be provided for the parameter hints. -
When using the feature
Trigger Parameter Hints
<kbd>⇧</kbd><kbd>⌘</kbd><kbd>Space</kbd> it should trigger the parameter hints for the call to the local function.
Actual behavior
No IntelliSense provided for 1, and no parameter hints triggered for 2.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Viewing method parameter information | WebStorm ...
Parameter hints show the names of parameters in calls of methods and functions. Parameter hints are shown right in the editor next to...
Read more >c++ - How do I show the function parameter names in ...
Showing inline parameter hints on Visual Studio 2019. Unfortunately, you did not highlight or mark or circle whatever it is that you want...
Read more >IntelliSense in Visual Studio
You can manually invoke Parameter Info by choosing Edit > IntelliSense > Parameter Info, by pressing Ctrl+Shift+Space, or by choosing the ...
Read more >Utilise JSDoc comment tags so that VSCode intellisense ...
Without proper intellisense, we often make typos, call the method ... tag provides the name, type, and description of a function parameter.
Read more >Settings Reference for Python - Visual Studio Code
Diagnostics for call arguments for functions or methods that have an unknown type. reportUnknownLambdaType, Diagnostics for input or return parameters for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem here is that in the SignatureHelpService, we are first finding the containingType for the given invocation and then returning all the methods in that containingType with the same name as the method. In case of localFunction , the containing type is being returned as the Class name and not the main function .But I am not sure whether this is the problem with roslyn returning the incorrect containingType or a problem with the way we are finding the methodOverloads in omnisharp-roslyn.
This issue has been fixed in the 1.14 milestone. We just released a beta of 1.14 - https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.14.0-beta4. Follow these instructions to install a beta release of C# for VS Code.