fix(nix): use published diagnostics for nixd

This commit is contained in:
Tyce Herrman authored and Dr. Dominik Jain committed 2026-08-05 11:40:52 +02:00
1 parent e6b3852117
commit e03094f5bc
3 files changed
+9

No files matched your search

+2
View File
@@ -35,6 +35,8 @@ Status of the `main` branch. Changes prior to the next official version change w
project creation)
- Add `python_basedpyright` as an alternative Python language server
- Nix/nixd: support custom `ls_path` launchers and external JSON settings through `config_path` #1737
- Fix: Nix/nixd diagnostics now use published diagnostics instead of the unsupported
`textDocument/diagnostic` request, which terminated nixd #1802
- Fix: `get_diagnostics_for_file` crashed with `SolidLSPException` for any Ansible file with at least
one lint finding, because `ansible-language-server` doesn't implement `textDocument/documentSymbol`
and the request used to map diagnostics onto owning symbols just threw. `AnsibleLanguageServer` now
+6
View File
@@ -378,6 +378,12 @@ class NixLanguageServer(SolidLanguageServer):
}
return initialize_params
@override
def _supports_pull_diagnostics(self) -> bool:
# nixd publishes diagnostics after textDocument/didOpen but terminates when it receives
# textDocument/diagnostic. Force the published-diagnostics path instead.
return False
def _start_server(self):
"""Start nixd server process"""
initialize_params = self._create_initialize_params()
+1
View File
@@ -259,3 +259,4 @@ class TestNixLanguageServer:
(),
min_count=1,
)
assert language_server.is_running()