Skip to content

Improve signature help for functions with similarly named parameters #1211

Open
@dbanck

Description

@dbanck

Background

In #1077 we have introduced support for built-in functions. By default, function parameter highlighting is based on the parameter label. This leads to incorrect highlighting for functions that share a parameter name, such as format(format string, ...).

Expected Behavior

The parameter format is highlighted instead of the function name.

Actual Behavior

CleanShot 2023-03-14 at 15 33 32@2x

Steps to Reproduce

Autocomplete or type format(

Proposal

  • Use [uinteger, uinteger] instead of string in ParameterInformation
  • Introduce an updated ParameterInformation type
  • Use the new ParameterInformation type in the whole request and response cycle
  • Update ToSignatureHelp to calculate the index and offset of the parameter name in the function label

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions