mirror of
https://github.com/oxalica/nil.git
synced 2024-11-22 02:55:39 +03:00
Update docs examples to use nixfmt-rfc-style
This is now the chosen formatter for nixpkgs.
This commit is contained in:
parent
555d517d46
commit
9125bfeaff
@ -70,7 +70,7 @@ Merge this setting into your `coc-settings.json` (open with `:CocConfig`).
|
||||
// Uncomment these to tweak settings.
|
||||
// "settings": {
|
||||
// "nil": {
|
||||
// "formatting": { "command": ["nixpkgs-fmt"] }
|
||||
// "formatting": { "command": ["nixfmt"] }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@ -108,7 +108,7 @@ Add the following elisp code to your configuration. (using `use-package`)
|
||||
:after (lsp-mode)
|
||||
:demand t
|
||||
:custom
|
||||
(lsp-nix-nil-formatter ["nixpkgs-fmt"]))
|
||||
(lsp-nix-nil-formatter ["nixfmt"]))
|
||||
|
||||
(use-package nix-mode
|
||||
:hook (nix-mode . lsp-deferred)
|
||||
@ -144,7 +144,7 @@ Modify the extension's settings in your `settings.json`.
|
||||
// Uncomment these to tweak settings.
|
||||
// "nix.serverSettings": {
|
||||
// "nil": {
|
||||
// "formatting": { "command": ["nixpkgs-fmt"] }
|
||||
// "formatting": { "command": ["nixfmt"] }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ let
|
||||
['nil'] = {
|
||||
testSetting = 42,
|
||||
formatting = {
|
||||
command = { "nixpkgs-fmt" },
|
||||
command = { "nixfmt" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -97,7 +97,7 @@ let
|
||||
nil.server.path = pkgs.writeShellScript "nil" ''
|
||||
exec "$NIL_PATH" "$@"
|
||||
'';
|
||||
nil.formatting.command = [ "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" ];
|
||||
nil.formatting.command = [ (pkgs.lib.getExe pkgs.nixfmt-rfc-style) ];
|
||||
nil.diagnostics.excludedFiles = [ "generated.nix" ];
|
||||
nil.nix.flake.autoEvalInputs = true;
|
||||
nil.nix.maxMemoryMB = 2048;
|
||||
|
@ -23,7 +23,7 @@ Default configuration:
|
||||
// External formatter command (with arguments).
|
||||
// It should accepts file content in stdin and print the formatted code into stdout.
|
||||
// Type: [string] | null
|
||||
// Example: ["nixpkgs-fmt"]
|
||||
// Example: ["nixfmt"]
|
||||
"command": null,
|
||||
},
|
||||
"diagnostics": {
|
||||
|
Loading…
Reference in New Issue
Block a user