languageserver
languageserver copied to clipboard
languageserver features doesn't work on saved files
Hi all, I've noticed that lsp featruers as autocompliation, on hover popup etc aren't working when I'm working on a saved R file, but if I start a new file and set it as an R file (without seving) everything works fine.
Describe the bug autocompliation, and on hover popups aren't working when editing saved files, but do work on an unsaved R file.
To Reproduce
- Open a saved .R file
- Type a function name or hover over a function ,and expact popup to apear
- nothing happens
- Open a new file (
ctrl
+alt
+win
+n
), chooseR document
from the dropdown - Start typing a function name or hover over a fucntion: a pop up appears!
User settings.JSON
:
Workspace settings.JSON
:
I'm using Win 11, and a fresh install of VScode, R extention and languageserver
OMG I'm so glad there is already an open issue on this. I am experiencing exactly the same issue.
Autocomplete in an unsaved file:
Note how I can autocomplete function arguments using tab.
Autocomplete in an saved file:
The range of functions appearing when I type rno
is very much reduced, rnorm
is not available. Also autocompleting function arguments is now not possible.
@ratnanil thank you! This is exactly what I am experiencing
Anyone?
Would you like to turn on r.lsp.debug
and go to Output -> R Language Server and see if there is something wrong in the log?
Hi @renkun-ken, This is with debug on (nothing is happaning when i'm hovering over code, etc.)
Do you mean that when you edit the code or hover in this saved file, no log is produced by the language server?
Looks like the language client ignores this file for some reason. What's the full path of this file?
That's true. no log is produced and it seems like the client ignores any saved file...
That's the file path: C:\Alternativ\scripts\analysis\public_transit_changes\tactic_nataz_bus_speeds_analysis.R
What's the path of your workspace folder?
I'm not sure how to find it.. I think It's C:/ [image: image.png]
On Fri, Feb 10, 2023 at 3:24 PM Kun Ren @.***> wrote:
What's the path of your workspace folder?
— Reply to this email directly, view it on GitHub https://github.com/REditorSupport/languageserver/issues/595#issuecomment-1425808315, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQUJ2BE7RXISXQJ6MX6DCD3WWY6QFANCNFSM6AAAAAAUGFZURA . You are receiving this because you authored the thread.Message ID: @.***>