Closed KodyVB closed 2 years ago
First of all, Do you know what VSCode does in this situation?
This problem can be cmp-nvim-lsp-signature-help side but also can be an LSP side problem.
I don't use VS Code, so I'll walk through what I just did and the results:
foo(
, it brings up a help box with first: str
highlightedfoo(second=
, the highlight changes to second: int
foo(second=1,
, the hint box stays up but doesn't highlight anythingfoo(second=1, first=
, the hint box highlights first: str
foo(second=1, first='a',
, the hint box remains, highlighting nothing againfoo(second=1, first='a', third=
, the hint box highlights third: list
So in VS Code it does work for the most part - the only thing that would be missing would be it highlighting the first unused parameter, which I'm guessing that's a Pyright problem. But the hint box remaining and highlighting the parameter once the user types the variable name is desired.
I concur, this is what is stopping me from using this :(
I was trying this out with Pyright as my language server for Python files, and found that if I call a function defined as:
like:
foo('a', 2, [])
, then it works as expected, highlighting the next parameter after each comma. However, if I type out:foo(first='a',
, then the help box stops appearing. Is there a way to make it so the help box doesn't disappear when trying to assign values to arguments like that, and perhaps use=
as a key to have it search for that parameter to highlight since they can be out of order that way?