Files
neovim/runtime/doc
Yi Ming f486f1742e perf(lsp): include previousResultId in DocumentDiagnosticParams #32887
Problem:
Users of the Roslyn (C#) LSP have encountered significant delays when
retrieving pull diagnostics in large documents while using Neovim. For
instance, diagnostics in a 2000-line .cs file can take over 20 seconds
to display after edits in Neovim, whereas in VS Code, diagnostics for
the same file are displayed almost instantly.

As [mparq noted](https://github.com/seblj/roslyn.nvim/issues/93#issuecomment-2508940330)
in https://github.com/seblj/roslyn.nvim/issues/93, VS Code leverages
additional parameters specified in the [LSP documentation for
textDocument/diagnostic](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#documentDiagnosticParams),
specifically:

- previousResultId
- identifier

Solution:
When requesting diagnostics, Neovim should include the
`previousResultId` and `identifier` parameters as part of the request.
These parameters enable the server to utilize caching and return
incremental results.

Support for maintaining state is already present in the
[textDocument/semanticTokens implementation](8f84167c30/runtime/lua/vim/lsp/semantic_tokens.lua (L289)).
A similar mechanism can be implemented in `textDocument/diagnostic` handler.
2025-04-26 09:09:20 -07:00
..
2023-07-25 05:07:13 -07:00
2025-04-12 10:21:03 -07:00
2025-01-01 12:29:51 -08:00
2024-10-23 14:13:42 +02:00
2024-05-15 23:19:26 +02:00
2021-09-10 08:48:27 +02:00
2023-06-25 17:14:28 +02:00
2023-10-29 16:02:32 +08:00
2025-03-26 05:49:48 -07:00
2025-01-09 09:26:45 -08:00
2025-03-30 13:29:36 -07:00
2025-03-17 12:31:53 +01:00
2023-05-13 21:33:22 +02:00
2025-04-13 07:41:54 +08:00
2025-03-15 15:00:44 +01:00
2025-02-17 10:33:20 +08:00
2022-10-14 08:01:13 -07:00
2025-03-17 12:31:53 +01:00
2025-03-30 13:29:36 -07:00
2025-04-13 07:41:54 +08:00
2025-04-12 10:21:03 -07:00
2024-11-21 06:50:30 +08:00
2025-04-05 06:01:40 -07:00
2024-01-18 00:14:48 -08:00
2024-04-30 04:30:21 -07:00
2025-03-02 14:27:52 -08:00
2023-01-01 15:05:13 +01:00
2023-06-19 08:40:33 -07:00
2025-03-15 15:00:44 +01:00
2025-03-02 14:27:52 -08:00
2025-02-15 14:55:25 +01:00
2025-03-18 06:18:37 -07:00
2023-08-10 17:28:02 +08:00
2025-01-03 08:29:36 -08:00
2024-04-23 08:20:36 +08:00
2024-05-11 18:14:03 +08:00
2023-04-23 15:22:55 +02:00
2023-01-03 10:07:43 +00:00
2023-06-25 17:14:28 +02:00
2023-06-19 08:40:33 -07:00
2023-06-25 17:14:28 +02:00
2023-06-25 17:14:28 +02:00
2021-05-01 22:29:03 -04:00
2023-06-25 17:14:28 +02:00
2023-06-25 17:14:28 +02:00
2024-04-30 05:54:03 +08:00
2023-06-26 11:29:12 +02:00
2023-07-25 05:07:13 -07:00
2023-06-19 08:40:33 -07:00
2025-03-18 06:18:37 -07:00