Skip to content

Commit fb9b136

Browse files
shuinclyc
authored andcommitted
nixd: replace nixpkgs-fmt for nixfmt
1 parent 5b5e4a4 commit fb9b136

File tree

6 files changed

+9
-14
lines changed

6 files changed

+9
-14
lines changed

default.nix

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
meson,
99
ninja,
1010
nix,
11-
nixpkgs-fmt,
1211
pkg-config,
1312
nlohmann_json,
1413
python312,
@@ -29,10 +28,7 @@ stdenv.mkDerivation {
2928
pkg-config
3029
];
3130

32-
nativeCheckInputs = [
33-
lit
34-
nixpkgs-fmt
35-
];
31+
nativeCheckInputs = [ lit ];
3632

3733
buildInputs = [
3834
nix

flake.nix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
};
3939
regressionDeps = with pkgs; [
4040
clang-tools
41-
nixpkgs-fmt
4241
lit
4342
];
4443
shellOverride = old: {
@@ -66,7 +65,7 @@
6665
devShells.nvim = pkgs.mkShell {
6766
nativeBuildInputs = [
6867
nixd
69-
pkgs.nixpkgs-fmt
68+
pkgs.nixfmt-rfc-style
7069
pkgs.git
7170
(import ./nixd/docs/editors/nvim-lsp.nix { inherit pkgs; })
7271
];
@@ -105,7 +104,7 @@
105104
devShells.vscodium = pkgs.mkShell {
106105
nativeBuildInputs = [
107106
nixd
108-
pkgs.nixpkgs-fmt
107+
pkgs.nixfmt-rfc-style
109108
(import ./nixd/docs/editors/vscodium.nix { inherit pkgs; })
110109
];
111110
};

nixd/docs/configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ For vscode users you should write `settings.json`[^settings] like this:
5959
"nixd": {
6060
"formatting": {
6161
// This is the default if ommited.
62-
"command": [ "nixpkgs-fmt" ]
62+
"command": [ "nixfmt" ]
6363
},
6464
"options": {
6565
// By default, this entriy will be read from `import <nixpkgs> { }`
@@ -94,7 +94,7 @@ nvim_lsp.nixd.setup({
9494
expr = "import <nixpkgs> { }",
9595
},
9696
formatting = {
97-
command = { "nixpkgs-fmt" },
97+
command = { "nixfmt" },
9898
},
9999
options = {
100100
nixos = {
@@ -130,7 +130,7 @@ nvim_lsp.nixd.setup({
130130
},
131131
"formatting": {
132132
// Which command you would like to do formatting
133-
"command": [ "nixpkgs-fmt" ]
133+
"command": [ "nixfmt" ]
134134
},
135135
// Tell the language server your desired option set, for completion
136136
// This is lazily evaluated.

nixd/docs/editors/nvim-lsp.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ let
368368
expr = "import <nixpkgs> { }",
369369
},
370370
formatting = {
371-
command = { "nixpkgs-fmt" },
371+
command = { "nixfmt" },
372372
},
373373
options = {
374374
nixos = {

nixd/docs/nixd-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"formatting": {
4444
"command": {
4545
"description": "Which command you would like to do formatting",
46-
"default": "nixpkgs-fmt",
46+
"default": "nixfmt",
4747
"type": "string"
4848
}
4949
},

nixd/include/nixd/Controller/Configuration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace nixd {
1313
// NOLINTBEGIN(readability-identifier-naming)
1414
struct Configuration {
1515
struct Formatting {
16-
std::vector<std::string> command = {"nixpkgs-fmt"};
16+
std::vector<std::string> command = {"nixfmt"};
1717
} formatting;
1818

1919
struct OptionProvider {

0 commit comments

Comments
 (0)