languageserver icon indicating copy to clipboard operation
languageserver copied to clipboard

Code autocomplete not working

Open shihai-gong opened this issue 3 years ago • 14 comments
trafficstars

Code autocomplete not working if the function does not have a package name in front of it, even if the package is already loaded。 image image

shihai-gong avatar Jan 15 '22 14:01 shihai-gong

There could be a delay between you type library(ggplot2) and the expected completion items appear when you type ggplot due to the dependency resolution is done in an async way by the background workers.

Does ggplot ever appear in your completion, even after a delay?

renkun-ken avatar Jan 15 '22 14:01 renkun-ken

It doesn't work, even for arguments inside a function in R-4.1.2, but it works fine in R - 4.1.0.

发件人: Kun Ren 发送时间: 2022年1月15日 22:56 收件人: REditorSupport/vscode-R 抄送: a_shihai; Author 主题: Re: [REditorSupport/vscode-R] Code autocomplete not working (Issue#943)

There could be a delay between you type library(ggplot2) and the expected completion items appear when you type ggplot due to the dependency resolution is done in an async way by the background workers. Does ggplot ever appear in your completion, even after a delay? — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

shihai-gong avatar Jan 15 '22 15:01 shihai-gong

Would you like to install the latest development version of languageserver via

remotes::install_github("REditorSupport/languageserver")

and see if the problem still persists?

renkun-ken avatar Jan 15 '22 16:01 renkun-ken

Amazing, when I install the version on hitub, it works fine, and there is also a problem, when I quit vscode, R still works in the background, is there a way to solve this problem? Thank you. 发件人: Kun Ren 发送时间: 2022年1月16日 00:12 收件人: REditorSupport/vscode-R 抄送: a_shihai; Author 主题: Re: [REditorSupport/vscode-R] Code autocomplete not working (Issue#943)

Would you like to install the latest development version of languageserver via remotes::install_github("REditorSupport/languageserver") and see if the problem still persists? — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

shihai-gong avatar Jan 16 '22 02:01 shihai-gong

when I install the version on hitub, it works fine

Glad to hear that it works for you.

when I quit vscode, R still works in the background, is there a way to solve this problem

It is just resolved via REditorSupport/vscode-R#941. I'll publish a new release very soon.

renkun-ken avatar Jan 16 '22 03:01 renkun-ken

Unfortunately, when I restarted vscode, it seems to be back to what it was before.

发件人: Kun Ren 发送时间: 2022年1月16日 11:24 收件人: REditorSupport/vscode-R 抄送: a_shihai; Author 主题: Re: [REditorSupport/vscode-R] Code autocomplete not working (Issue#943)

when I install the version on hitub, it works fine Glad to hear that it works for you. when I quit vscode, R still works in the background, is there a way to solve this problem It is just resolved via REditorSupport/vscode-R#941. I'll publish a new release very soon. — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

shihai-gong avatar Jan 16 '22 04:01 shihai-gong

Which problem still exists?

renkun-ken avatar Jan 16 '22 05:01 renkun-ken

哪个问题还存在? Code auto-completion problem persists . R did not exit normally has been resolved. image

shihai-gong avatar Jan 16 '22 05:01 shihai-gong

Should be a languageserver issue. I'll transfer this issue there.

renkun-ken avatar Jan 16 '22 06:01 renkun-ken

Would you like to turn on r.lsp.debug in vscode and go to the Output pane, choose "R Language Server" and do you see any error when you type gg?

Would you like to put your log here?

renkun-ken avatar Jan 16 '22 06:01 renkun-ken

I seem to find the reason for this, probably due to the fact that I set up the default mirror for Bioconductor, when I remove the mirror, the code autocomplete works fine, but I don't know why it affects image

shihai-gong avatar Jan 16 '22 09:01 shihai-gong

Where do you write your options(BioC_mirror=...)? Looks like your code contains some invalid characters. If it is in your .Rprofile, then the callr session might crash as reported by the parser.

renkun-ken avatar Jan 16 '22 11:01 renkun-ken

I wrote it in Rprofile. site, but I don't think there's anything wrong with it. options(BioC_mirror="https://mirrors.tuna.tsinghua.edu.cn/bioconductor")

shihai-gong avatar Jan 16 '22 11:01 shihai-gong

When I modify the content in .Rprofile does not appear this problem.

shihai-gong avatar Jan 16 '22 14:01 shihai-gong