question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No IntelliSense & parameter hints for calls to local functions

See original GitHub issue

Environment 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

  1. When typing arguments for the call to the local function, in var flag = LocalFunction(1);, IntelliSense should be provided for the parameter hints.

  2. 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:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
akshita31commented, Nov 23, 2017

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.

0reactions
akshita31commented, Feb 7, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found