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 inclyc committed Aug 10, 2024
1 parent 5b5e4a4 commit fb9b136
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 14 deletions.
6 changes: 1 addition & 5 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
meson,
ninja,
nix,
nixpkgs-fmt,
pkg-config,
nlohmann_json,
python312,
Expand All @@ -29,10 +28,7 @@ stdenv.mkDerivation {
pkg-config
];

nativeCheckInputs = [
lit
nixpkgs-fmt
];
nativeCheckInputs = [ lit ];

buildInputs = [
nix
Expand Down
5 changes: 2 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
};
regressionDeps = with pkgs; [
clang-tools
nixpkgs-fmt
lit
];
shellOverride = old: {
Expand Down Expand Up @@ -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; })
];
Expand Down Expand Up @@ -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; })
];
};
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

0 comments on commit fb9b136

Please sign in to comment.