Communicate with language servers in terms of UTF-16 coordinates

This required indexing UTF-16 positions in `Rope`. We tried opting
into the UTF-8 experimental support but it didn't seem to work
correctly and the standard is UTF-16 anyway.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2021-10-29 18:31:21 +02:00
parent 9c1b01521a
commit 6212ebad9b
11 changed files with 564 additions and 221 deletions

View file

@ -537,6 +537,10 @@ where
self.cursor.start()
}
pub fn end(&self, cx: &<T::Summary as Summary>::Context) -> D {
self.cursor.end(cx)
}
pub fn item(&self) -> Option<&'a T> {
self.cursor.item()
}