theHamsta / nvim-semantic-tokens

Apache License 2.0
84 stars 12 forks source link

Don't invalidate highlights on error or stale response #12

Closed badicsalex closed 2 years ago

badicsalex commented 2 years ago

With rust_analyzer, if I add or remove multiple lines in quick succession, there are multiple in-flight token requests. The tick check fails for the first response, which leaves the buffer un-highlighted momentarily, but then the 'correct' response arrives, and highlighting is correct again.

Stale highlights shouldn't cause a problem, as LSP highlights should be strictly better than non-LSP ones 99% of the times.

badicsalex commented 2 years ago

Despite what the commit message says, it may not properly fix #7