Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve signature help for functions with similarly named parameters #1211

Open
3 tasks
dbanck opened this issue Mar 15, 2023 · 0 comments
Open
3 tasks

Improve signature help for functions with similarly named parameters #1211

dbanck opened this issue Mar 15, 2023 · 0 comments
Labels
bug Something isn't working textDocument/signatureHelp

Comments

@dbanck
Copy link
Member

dbanck commented Mar 15, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working textDocument/signatureHelp
Projects
None yet
Development

No branches or pull requests

1 participant