# lsp: Fix dynamic registration of document diagnostics \(\#41929\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 9bf212bd1e89bf6a77086488b36e358bbd619779

Requested commit: 9bf212bd1e89bf6a77086488b36e358bbd619779

Commit: 9bf212bd1e89bf6a77086488b36e358bbd619779

Tree: 61a388cf213adad907a3a5b65b05c32a379b15eb

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
lsp: Fix dynamic registration of document diagnostics (#41929)

- lsp: Fix dynamic registration of diagnostic capabilities not taking
effect when an initial capability is not specified
Gist of the issue lies within use of .get_mut instead of .entry. If we
had not created any dynamic capability beforehand, we'd miss a
registration, essentially

- **Determine whether to update remote caps in a smarter manner**

Release Notes:

- Fixed document diagnostics with Ty language server.
```

## Parents

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

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