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.
9bf212bd1ePiotr Osiewicz committed on 11/4/2025, 6:23:14 PM· committed by GitHubparent38cd16a
1 file changedLine totals unavailable