GramEditor/gram
37
981
Fork
You've already forked gram
88

nixd fails despite $PATH presence #347

Open
opened 2026年06月20日 23:31:55 +02:00 by ekhh · 1 comment

Background

nixd is a Nix language server backed by the Nix Community. It supports some new features and is the de facto successor of nil, which has not been updated for quite a while now.

Problem

nixd is not supported in Gram. I have not learned Rust, but Gram seems to be checking for only the presence of nil. This causes any attempt to use nixd to fail regardless of language_servers and $PATH if and only if nil is unavailable. It also causes nil to appear as nixd if and only if nil is available.

2026年06月20日T14:05:19-07:00 ERROR [project::lsp_store] Failed to start language server "nixd": Download disabled for this language server, check the configuration

Steps to reproduce

  1. Make nixd or nil available in $PATH (e.g. by running nix-shell -p nixd and launching gram).
  2. Apply the following configurations in settings.jsonc:
{
	"languages" :{
		"Nix" :{
 		// nixd fails if nil is unavailable; nil appears as nixd if nil is available.
			"language_servers": ["nixd"]
		}
	}
}
{
	"languages" :{
		"Nix" :{
 		// If nil is available, editor mistakes nil for nixd and uses it regardless of nixd availability.
 		// Both fails if nil is unavailable. This also results in duplicated tool tips.
			"language_servers": ["nil", "nixd"]
		}
	}
}
{
	"languages" :{
		"Nix" :{
 		// nil used; expected behaviour.
			"language_servers": ["nil"]
		}
	}
}
  1. Attempt to edit any Nix file.

System metadata

  • system: "x86_64-linux"
  • host os: Linux 7.0.12-zen1, NixOS, 26.05 (Yarara), 26.05.20260611.a037402
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.34.7
  • channels(root): ""
  • nixpkgs: /nix/store/zx3v86x9xyh8jvac5zg6px9gkg9v0igq-source
### Background [`nixd`](https://github.com/nix-community/nixd) is a Nix language server backed by the [Nix Community](https://github.com/nix-community). It supports some new features and is the _de facto_ successor of [`nil`](https://github.com/oxalica/nil), which has not been updated for quite a while now. ### Problem `nixd` is not supported in Gram. I have not learned Rust, but [Gram seems to be checking for only the presence of `nil`](https://codeberg.org/GramEditor/gram/src/commit/648c071514bc5c821b7bf954ba8e7eeb8e1a377d/crates/languages/src/nix.rs). This causes any attempt to use `nixd` to fail regardless of `language_servers` and `$PATH` if and only if `nil` is unavailable. It also causes `nil` to appear as `nixd` if and only if `nil` is available. <pre>2026年06月20日T14:05:19-07:00 <font color="#C01C28"><b>ERROR</b></font> [<b>project::lsp_store</b>] Failed to start language server &quot;nixd&quot;: Download disabled for this language server, check the configuration </pre> ### Steps to reproduce 1. Make `nixd` or `nil` available in `$PATH` (e.g. by running `nix-shell -p nixd` and launching `gram`). 2. Apply the following configurations in `settings.jsonc`: ```jsonc { "languages" :{ "Nix" :{ // nixd fails if nil is unavailable; nil appears as nixd if nil is available. "language_servers": ["nixd"] } } } ``` ```jsonc { "languages" :{ "Nix" :{ // If nil is available, editor mistakes nil for nixd and uses it regardless of nixd availability. // Both fails if nil is unavailable. This also results in duplicated tool tips. "language_servers": ["nil", "nixd"] } } } ``` ```jsonc { "languages" :{ "Nix" :{ // nil used; expected behaviour. "language_servers": ["nil"] } } } ``` 3. Attempt to edit any Nix file. ### System metadata - system: `"x86_64-linux"` - host os: `Linux 7.0.12-zen1, NixOS, 26.05 (Yarara), 26.05.20260611.a037402` - multi-user?: `yes` - sandbox: `yes` - version: `nix-env (Nix) 2.34.7` - channels(root): `""` - nixpkgs: `/nix/store/zx3v86x9xyh8jvac5zg6px9gkg9v0igq-source`
Owner
Copy link

Should be fixed on main now!

Should be fixed on main now!
Sign in to join this conversation.
main
main
test/wgpu-on-mac
test-ci/failing-test-mac
test/failing-test-mac
test/build-on-22-04
test/wgpu-present-mode-mailbox
v2.1
test/altgr-fix-again
test/2.0.0-rc1
test/linux-build
test/objc2
v1.2.1
3.0.1
3.0.0
2.2.0
2.1.2
2.1.1
2.1.0
2.0.0
1.2.1
1.2.0
1.1.0
1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
GramEditor/gram#347
Reference in a new issue
GramEditor/gram
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?