Skip to content

lsp: incorrect symbol positions #10437

@kitsonk

Description

@kitsonk

I noticed when editing documents, sometimes in larger documents, I started to see "incorrect" symbol positions in the editor. I believe this is because of the async nature of the language server, but the sync nature of tsc. I believe the symbols were starting to be calculated while additional text edits were occurring in the document, which resulted in the response positions for the symbols being off a few positions.

What we need to do is the version of the document before we go into tsc and then discard the results from tsc if the version of the document has changed, and re-run again with the new version until we get a matching pre and post versions. I guess we should also check into the cancellation API as well.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working correctlylsprelated to the language server

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions