Skip to content

Commit

Permalink
nix language server
Browse files Browse the repository at this point in the history
  • Loading branch information
BCNelson committed Dec 14, 2024
1 parent ad15906 commit 1c15cab
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
24 changes: 20 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
{
"nix.enableLanguageServer": true, // Enable LSP.
"nix.serverPath": "nixd", // The path to the LSP server executable.
"nixpkgs": {
"expr": "import <nixpkgs> {}",
},
"rust-analyzer.linkedProjects": [
"pkgs/install-system/Cargo.toml",
]
],
"nix.formatterPath": "alejandra",
"nix.serverSettings": {
"nixd": {
"formatting": {
"command": [ "alejandra" ]
},
"options": {
// By default, this entry will be read from `import <nixpkgs> { }`.
// You can write arbitrary Nix expressions here, to produce valid "options" declaration result.
// Tip: for flake-based configuration, utilize `builtins.getFlake`
"nixos": {
"expr": "(builtins.getFlake \"${workspaceFolder}\").nixosConfigurations.sierra-2.options"
},
// "home-manager": {
// "expr": "(builtins.getFlake \"${workspaceFolder}\").homeConfigurations.<name>.options"
// },
}
}
}
}
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
config.tools = {
alejandra.enable = false;
deadnix.enable = true;
nixpkgs-fmt.enable = true;
statix.enable = true;
};
}
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ in
zstd
terraform
nixd
nil
alejandra
agenix-rekey
age-plugin-yubikey
age-plugin-fido2-hmac
Expand Down

0 comments on commit 1c15cab

Please sign in to comment.