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

formatting is sometimes blocked by IntelliSense parsing #1928

Closed
daltairwalter opened this issue May 4, 2018 · 7 comments
Closed

formatting is sometimes blocked by IntelliSense parsing #1928

daltairwalter opened this issue May 4, 2018 · 7 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service performance
Milestone

Comments

@daltairwalter
Copy link

I frequently see cases where formatting is blocked by intelliSense parsing. This causes a lot of problems because format on save still saves the files, but they are unformatted. This is a significant problem because then they go into our source control and then when someone else modifies them the formatting happens and then the diffs become a mess.

Aside from this, the C++ IntelliSense in VSCode is both really useful and really buggy. I would LOVE a feature to temporarily disable it and turn it back on. This would solve several problems with IntelliSense like:

  1. how do I know if the problems currently showing are current or based on an old scan?
  2. Is IntelliSense going to be smart enough to rescan for my recent changes?
  3. If I make changes before IntelliSense started its scan and I would like to stop it and have it start over. It is slow and having it finish its pass takes a lot of time.

C++ extension 0.16.1
Version 1.22.2
Commit 3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9
Date 2018-04-12T16:38:45.278Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

@sean-mcmanus
Copy link
Contributor

Yeah, we've had fixing the IntelliSense blocking issue on our backlog for too long. @bobbrow I think we should just put all the messages that can block from IntelliSense (hover, etc.) on to a separate thread and allow things like formatting and go to definition to not get blocked, which should be a pretty quick fix, since I'm not sure when we'll get around to a more extensive solution.

You can turn intellisense on or off via changing the intelliSenseEngine setting.

I also get stale/incorrect squiggles randomly/frequently too while editing. We're supposed to pick up edits and re-queue the squiggles.

@daltairwalter
Copy link
Author

The "C_Cpp.intelliSenseEngine" has two options "Default" and "Tag Parser" - is "Tag Parser" off?

@bobbrow
Copy link
Member

bobbrow commented May 4, 2018

"Tag Parser" is not off, just a less accurate form of IntelliSense. If you switch to that one, everything is a DB lookup, but there is no symbol awareness so squiggles are turned off. It should definitely resolve your current problem with formatting not happening.

@sean-mcmanus, I agree, let's put in a stop-gap fix at least for formatting and code browsing until I can fix the message/task architecture.

@harikrishnan94
Copy link

Will the fix be released in 0.22.0 version?

@sean-mcmanus
Copy link
Contributor

Not sure yet -- the change is still being tested. It works in general, but there are some special cases we're still investigating, with possible fixes needed.

@sean-mcmanus
Copy link
Contributor

We fixed the main cause of formatting getting stuck with 0.22.0-insiders3 -- let us know if this is still a problem for you. It's possible there may be cases where formatting could still get stuck, but they should be pretty rare now.

@harikrishnan94
Copy link

Thanks it’s working for me.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service performance
Projects
None yet
Development

No branches or pull requests

4 participants