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

refactor(lsp): minor improvements to handling closed documents #11518

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Jul 26, 2021

This improves #10897 but doesn't completely resolve it.

The problem is that when a document with the same name of another document is re-opened, and that version of the document happened to not be changed, the version is both "1" and so tsc things nothing has changed and provides the diagnostics it provided before in response. This means:

  • If you open a document, but don't edit it.
  • You rename or delete that document.
  • You then rename another document to that original document.
  • That "new" document will have the diagnostics for the previous file up until the file is edited.

I looked at how vscode handles this situation with the built in TypeScript language server and they have a complex buffer system where the re-calculate all the diagnostics. I will look into it further down the road, but these changes are the best that can be done right now.

@kitsonk kitsonk merged commit c6f4e41 into denoland:main Jul 26, 2021
@kitsonk kitsonk deleted the kitsonk/issue10897 branch July 26, 2021 21:40
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

Successfully merging this pull request may close these issues.

None yet

2 participants