diff --git a/default.nix b/default.nix index ab6e0babb..26eff4b52 100644 --- a/default.nix +++ b/default.nix @@ -8,7 +8,6 @@ meson, ninja, nix, - nixpkgs-fmt, pkg-config, nlohmann_json, python312, @@ -29,10 +28,7 @@ stdenv.mkDerivation { pkg-config ]; - nativeCheckInputs = [ - lit - nixpkgs-fmt - ]; + nativeCheckInputs = [ lit ]; buildInputs = [ nix diff --git a/flake.nix b/flake.nix index 2fcfe2020..125f1fcd8 100644 --- a/flake.nix +++ b/flake.nix @@ -38,7 +38,6 @@ }; regressionDeps = with pkgs; [ clang-tools - nixpkgs-fmt lit ]; shellOverride = old: { @@ -66,7 +65,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 +104,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/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 {