Remove excessive hint update queries

* Filter out queries for outdated buffers just before hint tasks spawn:
  multicared edits might empit standalone events simultaneously
* Only spawn inlay update tasks for visible buffers with corresponding
  language
* Do not spawn tasks for local projects' buffers without LSP servers
This commit is contained in:
Kirill Bulatov 2023-06-30 08:19:57 +03:00
parent f83514cde4
commit ae54e1d224
3 changed files with 405 additions and 107 deletions

View file

@ -2489,7 +2489,12 @@ impl ToOffset for Point {
impl ToOffset for usize {
fn to_offset(&self, snapshot: &BufferSnapshot) -> usize {
assert!(*self <= snapshot.len(), "offset {self} is out of range");
assert!(
*self <= snapshot.len(),
"offset {} is out of range, max allowed is {}",
self,
snapshot.len()
);
*self
}
}