Fork of zed-extensions/nix
- Tree-sitter Query 69%
- Rust 31%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
This PR updates the CI workflow files from the main Zed repository based on the commit zed-industries/zed@3183c04515 The update includes a new version of the extension CLI which adds validation for semantic token rules for languages Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com> |
||
| .github/workflows | ||
| .zed | ||
| languages/nix | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| extension.toml | ||
| LICENSE | ||
| README.md | ||
Nix
Nix language support in Zed
Configuration
Various options can be configured via Zed settings.json files.
Configure Nixd
{
"lsp": {
"nixd": {
"settings": {
"diagnostic": {
"suppress": [ "sema-extra-with" ]
}
}
}
}
}
See: Nixd LSP Configuration Docs for more options.
Configure Nil
{
"lsp": {
"nil": {
"settings": {
"diagnostics": {
"ignored": [ "unused_binding" ]
}
}
}
}
}
See: Nil LSP Configuration Docs for more options.
Only use Nixd
{
"languages": {
"Nix": {
"language_servers": [ "nixd", "!nil" ]
}
}
}
Only use Nil
{
"languages": {
"Nix": {
"language_servers": [ "nil", "!nixd" ]
}
}
}
Configure formatters
You can configure formatters through LSP:
{
"lsp": {
"nil": { // or "nixd":
"initialization_options": {
"formatting": {
"command": ["alejandra", "--quiet", "--"] // or ["nixfmt"]
}
}
}
}
}
Or through Zed itself:
{
"languages": {
"Nix": {
"formatter": {
"external": {
"command": "alejandra", // or "nixfmt"
"arguments": ["--quiet", "--"]
}
}
}
}
}