Skip to content

R language server got errors. #5023

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

Closed
vvxin opened this issue Dec 6, 2022 · 3 comments
Closed

R language server got errors. #5023

vvxin opened this issue Dec 6, 2022 · 3 comments

Comments

@vvxin
Copy link

vvxin commented Dec 6, 2022

Fresh Helix installation on WSL2.

then install R and R/languageserver package.

but got the bottom error and the function description stays there on top. No auto-completion for user variables.

image

I googled that error message but got no clue. Any help, thanks!

@dgkf
Copy link
Contributor

dgkf commented Dec 7, 2022

I can reproduce this.

Exploring the log, it looks like the R LSP is replying to a signatureHelp request with response {"signatures":[],"activeSignature":-1}.

According to the LSP spec

export interface SignatureHelp {
  ...
  activeSignature?: uinteger
  ...
}

Which describes this particular field with

The active signature. If omitted or the value lies outside the range of signatures the value defaults to zero or is ignore if the SignatureHelp as no signatures.

When they say it can lie outside the range of signatures, I don't think they mean that it can be a negative value since its type is defined as a uinteger. This looks like an issue with R's languageserver package which sets a default of -1. Instead, they should not be passing activeSignature as part of the response if there is no active signature to return.

I'm familiar with the languageserver code base and can submit a PR to it to fix.

@archseer
Copy link
Member

archseer commented Dec 7, 2022

This was also a problem with some other language server if I remember correctly

@vvxin
Copy link
Author

vvxin commented Dec 7, 2022

Thanks @dgkf
The GitHub version of REditorSupport/languageserver now works fine with Helix.

@vvxin vvxin closed this as completed Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants