languageserver icon indicating copy to clipboard operation
languageserver copied to clipboard

languageserver features doesn't work on saved files

Open zamirD123 opened this issue 2 years ago • 9 comments

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

  1. Open a saved .R file
  2. Type a function name or hover over a function ,and expact popup to apear
  3. nothing happens
  4. Open a new file (ctrl+alt+ win +n), choose R document from the dropdown
  5. Start typing a function name or hover over a fucntion: a pop up appears!

User settings.JSON : image

Workspace settings.JSON: image

I'm using Win 11, and a fresh install of VScode, R extention and languageserver

zamirD123 avatar Jan 25 '23 11:01 zamirD123

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.

unsaved-file

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.

saved-file

ratnanil avatar Jan 27 '23 13:01 ratnanil

@ratnanil thank you! This is exactly what I am experiencing

zamirD123 avatar Jan 28 '23 14:01 zamirD123

Anyone?

zamirD123 avatar Feb 09 '23 18:02 zamirD123

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?

renkun-ken avatar Feb 10 '23 02:02 renkun-ken

Hi @renkun-ken, This is with debug on (nothing is happaning when i'm hovering over code, etc.) image

zamirD123 avatar Feb 10 '23 06:02 zamirD123

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?

renkun-ken avatar Feb 10 '23 07:02 renkun-ken

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

zamirD123 avatar Feb 10 '23 09:02 zamirD123

What's the path of your workspace folder?

renkun-ken avatar Feb 10 '23 13:02 renkun-ken

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: @.***>

zamirD123 avatar Feb 10 '23 15:02 zamirD123