Files
sourcekit-lsp/Sources
Max Desiatov d6ae933591 6.2: Fix semantic tokens out-of-sync in neovim after changes on disk (#2224)
Cherry-pick of #2223, merged as 45534b0b90
**Explanation**: When neovim detects a change of the document on-disk (eg. caused by git operations). It closes the document and re-opens it with the same document version but different contents. We didn’t clear the swift-syntax tree of a document when it was closed, so we re-used the old syntax tree for the re-opened document. Ensure we clear the syntax tree when the document is closed so we build a new tree when it is re-opened.
**Scope**: Limited to `closeDocument` notification.
**Risk**: Low due to limited scope, additional testing, and small size of the change.
**Testing**: Added an additional automated test case.
**Issue**: rdar://157046766
**Reviewer**: @bnbarham
2025-07-30 05:47:37 -07:00
..