-
Notifications
You must be signed in to change notification settings - Fork 0
nvim exclude #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvim exclude #372
Changes from all commits
2275ed1
177a061
42f18d2
766a2b2
da94930
b5f91d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,6 +139,7 @@ | |
| ... | ||
| }: | ||
| let | ||
| inherit (inputs.nixpkgs) lib; | ||
| devenvRoot = | ||
| let | ||
| envRoot = builtins.getEnv "DEVENV_ROOT"; | ||
|
|
@@ -151,6 +152,23 @@ | |
| }; | ||
| overlays = (import ./overlays) { inherit inputs; }; | ||
| }; | ||
| treefmtToml = builtins.fromTOML (builtins.readFile ./treefmt.toml); | ||
| treefmtSettings = lib.recursiveUpdate treefmtToml { | ||
| formatter = { | ||
| nix = (treefmtToml.formatter.nix or { }) // { | ||
| command = lib.getExe pkgs.nixfmt-rfc-style; | ||
| }; | ||
| biome = (treefmtToml.formatter.biome or { }) // { | ||
| command = lib.getExe pkgs.biome; | ||
| }; | ||
| json = (treefmtToml.formatter.json or { }) // { | ||
| command = lib.getExe pkgs.jsonfmt; | ||
| }; | ||
| shell = (treefmtToml.formatter.shell or { }) // { | ||
| command = lib.getExe pkgs.shfmt; | ||
| }; | ||
| }; | ||
| }; | ||
|
Comment on lines
+156
to
+171
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The logic for constructing Simplifying this will make the code more concise and easier to read. |
||
| in | ||
| { | ||
| # Force this attribute so devenv's deprecated helper packages don't surface during flake checks. | ||
|
|
@@ -166,14 +184,11 @@ | |
| treefmt = { | ||
| projectRootFile = "flake.nix"; | ||
| programs = { | ||
| biome.enable = true; | ||
| nixfmt.enable = true; | ||
| shfmt.enable = true; | ||
| stylua.enable = true; | ||
| taplo.enable = true; | ||
| jsonfmt.enable = true; | ||
| yamlfmt.enable = true; | ||
| }; | ||
| settings = treefmtSettings; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -174,4 +174,4 @@ | |
| "src": "https://github.com/christoomey/vim-tmux-navigator" | ||
| } | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach introduces significant architectural complexity. You're reading treefmt.toml, parsing it, then overriding commands manually with
lib.recursiveUpdate. This creates duplication since treefmt.toml already defines these commands. The previousprograms.jsonfmt.enable = truepattern was simpler and more maintainable. What specific problem does this refactoring solve?Agent: 🏛 Architecture