Skip to content
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

Intellisense broken for default VScode quick suggestion delay. #805

Closed
faldor20 opened this issue Jun 21, 2021 · 11 comments
Closed

Intellisense broken for default VScode quick suggestion delay. #805

faldor20 opened this issue Jun 21, 2021 · 11 comments

Comments

@faldor20
Copy link

faldor20 commented Jun 21, 2021

Recently (last few weeks) something has broken for me in Ionide vscode.
This happens on my 3 different windows machines.
Instead of getting intellisense suggestions. Nothing happens.
image

I can trigger it sometimes by typing part of the desired word
say "prin"
deleting some
"pr"
Then the popup appears sometimes.

I had a problem like this once before and fixed it by turning up the quick suggestion delay.
If I turn up the delay and make sure that I type more than 2 letters before the popup triggers it will work

Here is the complete log from the F# output in vscode.
log.log

That was all fresh f# project. "dotnet new console -lang f#"

Hopefully this is sufficiently reproduceable and detailed #802 😄

@baronfel
Copy link
Contributor

baronfel commented Jun 21, 2021

I won't be able to attempt to repro on my windows machine for a while, but you could be hitting path normalization errors like has been discussed in #800. One thing that would be helpful is to enable "FSharp.trace.server": "verbose" in your settings, this will add the LSP protocol messages back and forth from the client to the server, which can help drill down into precisely what's happening at a protocol level. Additionally, I think I get what you're describing, but a gif or something recorded with ScreenToGif or the equivalent can really help pinpoint the errant behavior.

@faldor20
Copy link
Author

faldor20 commented Jun 21, 2021

Verbose should have been enabled for that log.
Using the normal suggestion delay (10ms)
I pressed escape in the middle to make the popup go away and it worked after that ( i suspect this again has to do with there being at least 2 letters typed when the popup is created)
Animation
This is done with a 1000ms quick suggestion delay
Animation2

Oh and I disabled all my extension here just to make sure it wasn't something like that.

@baronfel
Copy link
Contributor

Sorry, I think you misunderstood me a bit. Verbose logging at the FSAC level was turned on, yes, but I was asking you to turn on the LSP-level logging via this new key. That would actually let us see the LSP calls that are driving the experience you're seeing.

@faldor20
Copy link
Author

Hey, I don't have that option... It is available when using FSharp language server. I used it just yesterday when fixing an issue with that. Would you like the log output from FSharp language server with that option enabled?
image

@baronfel
Copy link
Contributor

baronfel commented Jun 21, 2021

You can always add the option in the setting.json manually. We don't advertise it because it's an implementation detail of vscode. In general you can do LANGUAGENAME.trace.server and vscode will start tracing.

@faldor20
Copy link
Author

OHHHH, I see. Okay here we go, sorry about that :).
log2.log

@faldor20
Copy link
Author

That was me doing the same stuff as in the gif, I wrote just one letter. and it triggered and failed. I wrote two letters before the popup and it worked fine. I was able to have it work fine by starting the intellisense on a partially written word (with at least 2 letters).

@faldor20
Copy link
Author

Oh I just noticed if I trigger the intellisense using ctrl+space without typing anything first it works fine

@seanamos
Copy link

Here's another simple repo. Works fine until you are in a let ... =

Peek 2021-06-26 22-13

@faldor20
Copy link
Author

Okay, I've just started to have to do f# coding again and this problem is driving me mad. (Happening on both windows and linux)

I spent all of today going through FSAC trying to pin down why it is happening with little success.

  • I know the problem is caused by the TryGetRecentCheckResultsForFile call returning None.
  • I know that that call almost allways returns some if you trigger the quick suggestion without making a change to the file (via ctl+space) or if you type a correct symbol and then ".".
  • I know that FSlsp doesn't suffer from this problem, but it has falls back to reparsing the file if it's recentResults don't return with Some.
  • Hover signature has to call this same function and it works fine in that case.

My conclusion at this point is that there is something about making a change to the file that clears the cached typecheck results and they then get regenerated very shortly after. This is why adjusting your delay for the quick suggestions popup solves the problem.
I don't really understand the other parts of FSAC enough to know if some other system could be clearing the cached results or if there is a reason they are not being retrieved and other than implementing the fallback system from FSlsp I'm really not sure how to proceed.
Any thoughts? @baronfel

@ionide ionide deleted a comment from faldor20 Nov 18, 2021
@ionide ionide deleted a comment from faldor20 Nov 18, 2021
@Krzysztof-Cieslak
Copy link
Member

Fixed in 0.49.3

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

4 participants