# project: Take 2 on Handle textDocument/didSave and textDocument/didChange \(un\)registration and usage correctly \(\#36485\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/e3b593efbdfab2609a44ce3dee14be143d341155)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: e3b593efbdfab2609a44ce3dee14be143d341155

Requested commit: e3b593efbdfab2609a44ce3dee14be143d341155

Commit: e3b593efbdfab2609a44ce3dee14be143d341155

Tree: f4f285c16784e258ba68d488f0ae454b35718572

Author: Smit Barmase

Committer: GitHub

## Message

````
project: Take 2 on Handle textDocument/didSave and textDocument/didChange (un)registration and usage correctly  (#36485)

Relands https://github.com/zed-industries/zed/pull/36441 with a
deserialization fix.

Previously, deserializing `"includeText"` into
`lsp::TextDocumentSyncSaveOptions` resulted in a `Supported(false)` type
instead of `SaveOptions(SaveOptions { include_text: Option<bool> })`.

```rs
impl From<bool> for TextDocumentSyncSaveOptions {
    fn from(from: bool) -> Self {
        Self::Supported(from)
    }
}
```

Looks like, while dynamic registartion we only get `SaveOptions` type
and never `Supported` type.
(https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentSaveRegistrationOptions)

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
````

## Parents

- [8f567383e4bef1914c2e349fc8e984cfa5aae397](https://git.cafe/gitcafe/zed/commit/8f567383e4bef1914c2e349fc8e984cfa5aae397?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/e3b593efbdfab2609a44ce3dee14be143d341155?format=markdown)
