-
Notifications
You must be signed in to change notification settings - Fork 408
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
signatureHelp returns activeParameter = -1 #2434
Comments
This issue can probably be fixed in cmp-nvim-lsp (see PR above). I'm still interested in feedback if this behavior is expected. The LSP specs are a bit unclear to me in this regard:
I don't quite get the 2nd sentence. How can it be omitted/outside the range and at the same time default to 0? |
If you look at the protocol spec, you'll see |
See the discussion here: microsoft/vscode#145851. If we set it to There is a contribution that allows null active parameters to the spec, which is exactly what we want. I'm okay to follow the spec - return 0 instead of |
You're right. If I guess we depend on the spec being updated to properly support this. |
Doesn't the specs already include that case (outside range...)? But TBH I still struggle to parse this sentence:
To me this reads like: if value==nil or value==(outside range) then value==0 which makes no sense. This sentence looks like it's missing a part in the middle or something. |
FYI, looks like this PR is close to be merged. We can adopt the new spec once it's ready. |
The upstream PR is merged in the next spec version. We can consider adopting it sooner. |
I know this issue has been stale for a while, but I wanted to give it a bump. Currently Zed does not properly handle activeParameter being -1 because our lsp bindings (gluon-lang/lsp-types) expect it be a unsigned integer because that's how it's defined in v3.16 of the LSP spec (previously it was underspecified as The Dart LSP was doing the exact same thing, setting Here's the commit: dart-lang/sdk@5681cfa which fixed dart-lang/sdk#58577 Thanks for making a cool thing. |
Response from LS:
This breaks signature help with neovim (0.8.2) and cmp-nvim-lsp. For context: I also use nvim-jdtls, mason.nvim, mason-lspconfig.nvim and nvim-cmp.
I use eclipse.jdt.ls 1.19.0.
The text was updated successfully, but these errors were encountered: