@@ -969,20 +969,19 @@ impl Client {
969969 ) -> Option<impl Future<Output = Result<()>>> {
970970 let capabilities = self.capabilities.get().unwrap();
971971
972− let include_text = match &capabilities.text_document_sync {
973− Some(lsp::TextDocumentSyncCapability::Options(lsp::TextDocumentSyncOptions {
974− save: Some(options),
972+ let include_text = match &capabilities.text_document_sync.as_ref()? {
973+ lsp::TextDocumentSyncCapability::Options(lsp::TextDocumentSyncOptions {
974+ save: options,
975975 ..
976− })) => match options {
976+ }) => match options.as_ref()? {
977977 lsp::TextDocumentSyncSaveOptions::Supported(true) => false,
978978 lsp::TextDocumentSyncSaveOptions::SaveOptions(lsp_types::SaveOptions {
979979 include_text,
980980 }) => include_text.unwrap_or(false),
981− // Supported(false)
982− _ => return None,
981+ lsp::TextDocumentSyncSaveOptions::Supported(false) => return None,
983982 },
984− // unsupported
985− _ => return None,
983+ // see: https://github.com/microsoft/language-server-protocol/issues/288
984+ lsp::TextDocumentSyncCapability::Kind(..) => false,
986985 };
987986
988987 Some(self.notify::<lsp::notification::DidSaveTextDocument>(