@@ -255,11 +255,6 @@ impl Client {
258− // TODO: this is dumb. TextEdit describes changes to the initial doc (concurrent), but
259− // TextDocumentContentChangeEvent describes a series of changes (sequential).
260− // So S -> S1 -> S2, meaning positioning depends on the previous edits.
262− // Calculation is therefore a bunch trickier.
263 pub fn changeset_to_changes(
258 pub fn changeset_to_changes(
264 old_text: &Rope,
259 old_text: &Rope,
265 new_text: &Rope,
260 new_text: &Rope,
@@ -274,6 +269,12 @@ impl Client {
274 use crate::util::pos_to_lsp_pos;
269 use crate::util::pos_to_lsp_pos;
275 use helix_core::Operation::*;
270 use helix_core::Operation::*;
272+ // this is dumb. TextEdit describes changes to the initial doc (concurrent), but
273+ // TextDocumentContentChangeEvent describes a series of changes (sequential).
274+ // So S -> S1 -> S2, meaning positioning depends on the previous edits.
276+ // Calculation is therefore a bunch trickier.
277 // TODO: stolen from syntax.rs, share
278 // TODO: stolen from syntax.rs, share
278 use helix_core::RopeSlice;
279 use helix_core::RopeSlice;
279 fn traverse(pos: lsp::Position, text: RopeSlice) -> lsp::Position {
280 fn traverse(pos: lsp::Position, text: RopeSlice) -> lsp::Position {
@@ -397,8 +398,6 @@ impl Client {
400− // TODO: impl into() TextDocumentIdentifier / VersionedTextDocumentIdentifier for Document.
402 pub async fn text_document_did_close(
401 pub async fn text_document_did_close(
404 text_document: lsp::TextDocumentIdentifier,
403 text_document: lsp::TextDocumentIdentifier,
@@ -411,15 +410,22 @@ impl Client {
412 // will_save / will_save_wait_until
411 // will_save / will_save_wait_until
414− pub async fn text_document_did_save(&self) -> anyhow::Result<()> {
413+ pub async fn text_document_did_save(
415− unimplemented!()
414+ &self,
415+ text_document: lsp::TextDocumentIdentifier,
417+ self.notify::<lsp::notification::DidSaveTextDocument>(lsp::DidSaveTextDocumentParams {
419+ text: None, // TODO:
418 pub async fn completion(
424 pub async fn completion(
420 text_document: lsp::TextDocumentIdentifier,
426 text_document: lsp::TextDocumentIdentifier,
421 position: lsp::Position,
427 position: lsp::Position,
422− ) -> anyhow::Result<Vec<lsp::CompletionItem>> {
428+ ) -> Result<Vec<lsp::CompletionItem>> {
423 // TODO: figure out what should happen when you complete with multiple cursors
429 // TODO: figure out what should happen when you complete with multiple cursors
425 let params = lsp::CompletionParams {
431 let params = lsp::CompletionParams {