diff --git a/default.nix b/default.nix index ab6e0babb..2e5d79791 100644 --- a/default.nix +++ b/default.nix @@ -8,7 +8,7 @@ meson, ninja, nix, - nixpkgs-fmt, + nixfmt-rfc-style, pkg-config, nlohmann_json, python312, @@ -31,7 +31,7 @@ stdenv.mkDerivation { nativeCheckInputs = [ lit - nixpkgs-fmt + nixfmt-rfc-style ]; buildInputs = [ diff --git a/flake.nix b/flake.nix index 2fcfe2020..f8d87c063 100644 --- a/flake.nix +++ b/flake.nix @@ -38,7 +38,7 @@ }; regressionDeps = with pkgs; [ clang-tools - nixpkgs-fmt + nixfmt-rfc-style lit ]; shellOverride = old: { @@ -66,7 +66,7 @@ devShells.nvim = pkgs.mkShell { nativeBuildInputs = [ nixd - pkgs.nixpkgs-fmt + pkgs.nixfmt-rfc-style pkgs.git (import ./nixd/docs/editors/nvim-lsp.nix { inherit pkgs; }) ]; @@ -105,7 +105,7 @@ devShells.vscodium = pkgs.mkShell { nativeBuildInputs = [ nixd - pkgs.nixpkgs-fmt + pkgs.nixfmt-rfc-style (import ./nixd/docs/editors/vscodium.nix { inherit pkgs; }) ]; }; diff --git a/libnixf/default.nix b/libnixf/default.nix index 3970acef8..2e6a26acc 100644 --- a/libnixf/default.nix +++ b/libnixf/default.nix @@ -5,7 +5,7 @@ ninja, pkg-config, lit, - nixpkgs-fmt, + nixfmt-rfc-style, gtest, boost182, nlohmann_json, @@ -39,7 +39,7 @@ stdenv.mkDerivation { nativeCheckInputs = [ lit - nixpkgs-fmt + nixfmt-rfc-style ]; buildInputs = [ diff --git a/nixd/docs/configuration.md b/nixd/docs/configuration.md index 9def02e25..bfad71978 100644 --- a/nixd/docs/configuration.md +++ b/nixd/docs/configuration.md @@ -59,7 +59,7 @@ For vscode users you should write `settings.json`[^settings] like this: "nixd": { "formatting": { // This is the default if ommited. - "command": [ "nixpkgs-fmt" ] + "command": [ "nixfmt" ] }, "options": { // By default, this entriy will be read from `import { }` @@ -94,7 +94,7 @@ nvim_lsp.nixd.setup({ expr = "import { }", }, formatting = { - command = { "nixpkgs-fmt" }, + command = { "nixfmt" }, }, options = { nixos = { @@ -130,7 +130,7 @@ nvim_lsp.nixd.setup({ }, "formatting": { // Which command you would like to do formatting - "command": [ "nixpkgs-fmt" ] + "command": [ "nixfmt" ] }, // Tell the language server your desired option set, for completion // This is lazily evaluated. diff --git a/nixd/docs/editors/nvim-lsp.nix b/nixd/docs/editors/nvim-lsp.nix index 2dac06c33..72895ae48 100644 --- a/nixd/docs/editors/nvim-lsp.nix +++ b/nixd/docs/editors/nvim-lsp.nix @@ -368,7 +368,7 @@ let expr = "import { }", }, formatting = { - command = { "nixpkgs-fmt" }, + command = { "nixfmt" }, }, options = { nixos = { diff --git a/nixd/docs/nixd-schema.json b/nixd/docs/nixd-schema.json index 9a3751d75..c1a91ffbf 100644 --- a/nixd/docs/nixd-schema.json +++ b/nixd/docs/nixd-schema.json @@ -43,7 +43,7 @@ "formatting": { "command": { "description": "Which command you would like to do formatting", - "default": "nixpkgs-fmt", + "default": "nixfmt", "type": "string" } }, diff --git a/nixd/include/nixd/Controller/Configuration.h b/nixd/include/nixd/Controller/Configuration.h index 48b8f5be4..36d5c653a 100644 --- a/nixd/include/nixd/Controller/Configuration.h +++ b/nixd/include/nixd/Controller/Configuration.h @@ -13,7 +13,7 @@ namespace nixd { // NOLINTBEGIN(readability-identifier-naming) struct Configuration { struct Formatting { - std::vector command = {"nixpkgs-fmt"}; + std::vector command = {"nixfmt"}; } formatting; struct OptionProvider { diff --git a/treefmt.nix b/treefmt.nix index 00a70fc3f..945d7ff97 100644 --- a/treefmt.nix +++ b/treefmt.nix @@ -4,7 +4,7 @@ projectRootFile = "flake.nix"; programs = { clang-format.enable = true; - nixpkgs-fmt.enable = true; + nixfmt.enable = true; black.enable = true; }; }