Skip to content

Commit

Permalink
nixd: replace nixpkgs-fmt for nixfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
shu authored and shu committed Aug 4, 2024
1 parent d938026 commit 2120080
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
meson,
ninja,
nix,
nixpkgs-fmt,
nixfmt-rfc-style,
pkg-config,
nlohmann_json,
python312,
Expand All @@ -31,7 +31,7 @@ stdenv.mkDerivation {

nativeCheckInputs = [
lit
nixpkgs-fmt
nixfmt-rfc-style
];

buildInputs = [
Expand Down
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
};
regressionDeps = with pkgs; [
clang-tools
nixpkgs-fmt
nixfmt-rfc-style
lit
];
shellOverride = old: {
Expand Down Expand Up @@ -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; })
];
Expand Down Expand Up @@ -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; })
];
};
Expand Down
4 changes: 2 additions & 2 deletions libnixf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
ninja,
pkg-config,
lit,
nixpkgs-fmt,
nixfmt-rfc-style,
gtest,
boost182,
nlohmann_json,
Expand Down Expand Up @@ -39,7 +39,7 @@ stdenv.mkDerivation {

nativeCheckInputs = [
lit
nixpkgs-fmt
nixfmt-rfc-style
];

buildInputs = [
Expand Down
6 changes: 3 additions & 3 deletions nixd/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <nixpkgs> { }`
Expand Down Expand Up @@ -94,7 +94,7 @@ nvim_lsp.nixd.setup({
expr = "import <nixpkgs> { }",
},
formatting = {
command = { "nixpkgs-fmt" },
command = { "nixfmt" },
},
options = {
nixos = {
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion nixd/docs/editors/nvim-lsp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ let
expr = "import <nixpkgs> { }",
},
formatting = {
command = { "nixpkgs-fmt" },
command = { "nixfmt" },
},
options = {
nixos = {
Expand Down
2 changes: 1 addition & 1 deletion nixd/docs/nixd-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"formatting": {
"command": {
"description": "Which command you would like to do formatting",
"default": "nixpkgs-fmt",
"default": "nixfmt",
"type": "string"
}
},
Expand Down
2 changes: 1 addition & 1 deletion nixd/include/nixd/Controller/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace nixd {
// NOLINTBEGIN(readability-identifier-naming)
struct Configuration {
struct Formatting {
std::vector<std::string> command = {"nixpkgs-fmt"};
std::vector<std::string> command = {"nixfmt"};
} formatting;

struct OptionProvider {
Expand Down
2 changes: 1 addition & 1 deletion treefmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
projectRootFile = "flake.nix";
programs = {
clang-format.enable = true;
nixpkgs-fmt.enable = true;
nixfmt.enable = true;
black.enable = true;
};
}

0 comments on commit 2120080

Please sign in to comment.