Skip to content

nvim exclude - #372

Merged
shunkakinoki merged 6 commits into
mainfrom
nvim-exclude
Nov 26, 2025
Merged

nvim exclude#372
shunkakinoki merged 6 commits into
mainfrom
nvim-exclude

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Nov 26, 2025

Copy link
Copy Markdown
Owner
  • fix: add exclusion for Neovim pack lock file in JSON formatter
  • fix: remove Neovim pack lock file cleanup from sync process
  • fix: add missing newline at end of nvim-pack-lock.json
  • fix: add exclusion for nvim-pack-lock.json in formatter settings and enable Zsh integration for zoxide
  • fix: replace Neovim pack lock exclusion with TOML settings in flake.nix
  • fix: update treefmt settings in flake.nix and ensure newline at end of nvim-pack-lock.json

Summary by cubic

Exclude the Neovim plugin lockfile from formatting and remove lockfile cleanup in the sync step to stop noisy diffs. Move treefmt configuration into flake.nix for consistent formatter command wiring, and enable zoxide Bash/Zsh integration.

  • Bug Fixes

    • Exclude home-manager/programs/neovim/nvim-pack-lock.json from the JSON formatter.
    • Remove sed-based newline cleanup from neovim-sync in the Makefile.
  • Refactors

    • Parse treefmt.toml in flake.nix and set formatter commands (nixfmt-rfc-style, biome, jsonfmt, shfmt); keep stylua, taplo, yamlfmt configured.

Written for commit b5f91d2. Summary will update automatically on new commits.

Copilot AI review requested due to automatic review settings November 26, 2025 15:00
@coderabbitai

coderabbitai Bot commented Nov 26, 2025

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added Bash and Zsh shell integration support for zoxide.
  • Bug Fixes

    • Fixed Neovim plugin sync to stop modifying lock files automatically.
  • Refactor

    • Streamlined code formatter configuration structure to use centralized settings management.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

The changes refactor Treefmt configuration from individual enable flags to a TOML-based approach, remove Neovim plugin sync lock file mutations from the Makefile, add shell integration options for Zoxide, and exclude the Neovim lock file from JSON formatting.

Changes

Cohort / File(s) Summary
Treefmt configuration refactor
flake.nix, treefmt.toml
Replaces individual formatter enable flags (biome, nixfmt, shfmt, jsonfmt) with a consolidated TOML-based settings approach; derives treefmtSettings with explicit formatter commands for nix, biome, json, and shell; excludes nvim-pack-lock.json from JSON formatting.
Neovim sync cleanup
Makefile, home-manager/programs/neovim/nvim-pack-lock.json
Removes post-sync OS-specific sed-based editing and newline appending logic from neovim-sync target, stopping lock file mutations during plugin sync; trailing newline change in lock file.
Shell integration expansion
home-manager/programs/zoxide/default.nix
Adds enableBashIntegration and enableZshIntegration flags alongside existing Fish integration support.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~35 minutes

  • flake.nix: Requires careful review of the TOML-reading logic and recursiveUpdate behavior to ensure formatter command bindings are correctly wired into treefmtSettings and don't conflict with existing Treefmt configurations.
  • Makefile: Verify that removing the lock file cleanup doesn't introduce unintended side effects in the Neovim plugin sync workflow.
  • treefmt.toml: Confirm that the exclude pattern correctly targets the nvim-pack-lock.json file path.

Possibly related PRs

  • PR #371: Directly related; modifies the Makefile's neovim-sync logic and nvim-pack-lock.json handling in the opposite direction (this PR removes cleanup that the previous PR added/updated).

Suggested labels

codex

Poem

🐰 The formatters now TOML-dance,
Treefmt leads the configuration stance,
Lock files rest from their sed-based fate,
Zoxide shells integrate—how great!
Refactored paths with cleaner grace.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'nvim exclude' is vague and generic, using non-descriptive terms that don't clearly convey the scope of changes. It only hints at one aspect (Neovim exclusion) without indicating the broader refactoring of treefmt settings or zoxide integration changes included in the PR. Consider a more descriptive title like 'Exclude nvim-pack-lock.json from formatters and refactor treefmt configuration' to better reflect the main objectives.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description is well-related to the changeset, providing multiple detailed points about bug fixes (excluding nvim-pack-lock.json, removing sync cleanup) and refactors (treefmt configuration in flake.nix, zoxide integration).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch nvim-exclude

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the project's formatting and shell integration setup. It specifically addresses issues related to the nvim-pack-lock.json file by excluding it from automatic JSON formatting and removing redundant manual cleanup steps. Additionally, it centralizes the configuration of treefmt formatters within flake.nix by leveraging treefmt.toml, and extends zoxide's shell integration to include Zsh and Bash.

Highlights

  • Neovim Lock File Handling: The nvim-pack-lock.json file is now explicitly excluded from JSON formatting via treefmt.toml. The manual cleanup process for ensuring a newline at the end of this file has been removed from the Makefile's neovim-sync target, as a missing newline was directly added to the file itself.
  • Centralized Treefmt Configuration: The flake.nix now dynamically loads treefmt.toml and uses lib.recursiveUpdate to define formatter commands for nixfmt, biome, jsonfmt, and shfmt. This centralizes and streamlines how treefmt is configured, moving away from individual programs.enable flags in flake.nix.
  • Zoxide Shell Integration: Zsh and Bash shell integrations have been enabled for zoxide, enhancing its usability across different shell environments.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mesa-dot-dev

mesa-dot-dev Bot commented Nov 26, 2025

Copy link
Copy Markdown

Mesa Description

TL;DR

Improved handling of Neovim pack lock files (nvim-pack-lock.json) by excluding them from formatting and cleanup processes, ensuring proper file termination, and updating related configuration. Also, enabled Zsh integration for zoxide.

What changed?

  • Added exclusion for nvim-pack-lock.json in JSON formatter settings.
  • Removed nvim-pack-lock.json cleanup from the sync process.
  • Ensured nvim-pack-lock.json has a missing newline at the end.
  • Updated formatter settings and flake.nix to properly exclude nvim-pack-lock.json using TOML settings.
  • Enabled Zsh integration for zoxide.

Description generated by Mesa. Update settings

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a series of fixes and refactorings primarily related to Neovim configuration and code formatting. The exclusion of the nvim-pack-lock.json file from the JSON formatter is a good move, allowing for the removal of a complex and platform-dependent script from the Makefile. The other changes, such as adding a newline to the lock file, enabling more shell integrations for zoxide, and refactoring the treefmt configuration in flake.nix, are all positive improvements. My review includes one suggestion to simplify the new treefmt settings logic in flake.nix for better readability and maintainability.

Comment thread flake.nix
Comment on lines +156 to +171
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;
};
};
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The logic for constructing treefmtSettings can be simplified. Since you are using lib.recursiveUpdate, you don't need to manually merge each formatter's attributes with (treefmtToml.formatter.<name> or { }) // { ... }. The recursiveUpdate function will handle merging the command attribute into the existing formatter definitions from treefmt.toml correctly.

Simplifying this will make the code more concise and easier to read.

          treefmtSettings = lib.recursiveUpdate treefmtToml {
            formatter = {
              nix.command = lib.getExe pkgs.nixfmt-rfc-style;
              biome.command = lib.getExe pkgs.biome;
              json.command = lib.getExe pkgs.jsonfmt;
              shell.command = lib.getExe pkgs.shfmt;
            };
          };

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
flake.nix (1)

184-192: Hybrid configuration approach works but may benefit from a comment.

Some formatters use programs.*.enable (stylua, taplo, yamlfmt) while others come from the TOML-based settings. This is valid but could be confusing for future maintainers.

Consider adding a brief comment explaining the split:

          treefmt = {
            projectRootFile = "flake.nix";
+           # stylua, taplo, yamlfmt use treefmt-nix built-in definitions
+           # nix, biome, json, shell are configured via treefmt.toml
            programs = {
              stylua.enable = true;
              taplo.enable = true;
              yamlfmt.enable = true;
            };
            settings = treefmtSettings;
          };
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 17d5b2a and b5f91d2.

📒 Files selected for processing (5)
  • Makefile (0 hunks)
  • flake.nix (3 hunks)
  • home-manager/programs/neovim/nvim-pack-lock.json (1 hunks)
  • home-manager/programs/zoxide/default.nix (1 hunks)
  • treefmt.toml (1 hunks)
💤 Files with no reviewable changes (1)
  • Makefile
🧰 Additional context used
📓 Path-based instructions (12)
**/*.nix

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.nix: Use nixfmt for formatting all Nix files
Document complex configurations with comments in Nix files

**/*.nix: Use 2 spaces for indentation in Nix files
Keep line length under 100 characters in Nix files
Sort attribute sets alphabetically in Nix files
Use consistent spacing around operators in Nix files
Format lists and sets consistently in Nix files

Use treefmt.toml for formatting Nix files

**/*.nix: Use mkOption for configurable options in Nix modules
Implement proper typing for all options in Nix modules
Follow the Nix expression language style guide

Files:

  • home-manager/programs/zoxide/default.nix
  • flake.nix
**/default.nix

📄 CodeRabbit inference engine (CLAUDE.md)

Use default.nix files for module exports

Files:

  • home-manager/programs/zoxide/default.nix
home-manager/programs/*/default.nix

📄 CodeRabbit inference engine (.cursor/rules/home-manager.mdc)

Program configurations should be located in home-manager/programs/<name>/ and use home-manager's built-in modules when available

Files:

  • home-manager/programs/zoxide/default.nix
home-manager/programs/**/default.nix

📄 CodeRabbit inference engine (.cursor/rules/home-manager.mdc)

Program configurations must include all necessary dependencies in their configuration

Files:

  • home-manager/programs/zoxide/default.nix
home-manager/**/*.nix

📄 CodeRabbit inference engine (.cursor/rules/home-manager.mdc)

home-manager/**/*.nix: Use typed options whenever possible in Nix configurations
Document all configuration options in Nix modules and programs
Follow home-manager's module structure and keep configurations modular
Use proper indentation and formatting in Nix configuration files

Files:

  • home-manager/programs/zoxide/default.nix
home-manager/programs/**/*.nix

📄 CodeRabbit inference engine (.cursor/rules/home-manager.mdc)

Follow program-specific best practices in program configuration files

Program configurations in home-manager/programs/ should be organized by program name, include all necessary dependencies, use home.packages for package installations, and use programs.<name> when available in home-manager

Files:

  • home-manager/programs/zoxide/default.nix
**/*.{json,yaml,yml,toml}

📄 CodeRabbit inference engine (.cursor/rules/formatting.mdc)

**/*.{json,yaml,yml,toml}: Use consistent indentation (2 spaces) in configuration files
Sort keys alphabetically when possible in configuration files
Use clear, descriptive names in configuration files

Files:

  • treefmt.toml
  • home-manager/programs/neovim/nvim-pack-lock.json
**/*.{yaml,yml,toml}

📄 CodeRabbit inference engine (.cursor/rules/formatting.mdc)

Add comments for complex configurations

Files:

  • treefmt.toml
**/*.{js,ts,jsx,tsx,json}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Biome with 2-space indentation, 80-character line width, double quotes, and trailing commas (ES5) for JSON/JavaScript/TypeScript files

Files:

  • home-manager/programs/neovim/nvim-pack-lock.json
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (.cursor/rules/formatting.mdc)

**/*.{js,jsx,ts,tsx,json}: Format JavaScript/TypeScript/JSON files using Biome with 2-space indentation and 80 character line width
Enable Biome linter with recommended rules for JavaScript/TypeScript/JSON files

Files:

  • home-manager/programs/neovim/nvim-pack-lock.json
**/*.{js,jsx,ts,tsx,json,jsonc,md}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Use Biome for code formatting as configured in biome.json

Files:

  • home-manager/programs/neovim/nvim-pack-lock.json
flake.nix

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Maintain flake.nix as the main Nix configuration with proper structure

Always pin package versions in flake.lock

Files:

  • flake.nix
🧠 Learnings (14)
📓 Common learnings
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-11-25T09:34:40.062Z
Learning: Applies to **/*.nix : Use treefmt.toml for formatting Nix files
📚 Learning: 2025-11-25T09:34:55.014Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-11-25T09:34:55.014Z
Learning: Applies to home-manager/programs/**/*.nix : Follow program-specific best practices in program configuration files

Applied to files:

  • home-manager/programs/zoxide/default.nix
  • flake.nix
📚 Learning: 2025-11-25T09:34:55.014Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-11-25T09:34:55.014Z
Learning: Applies to home-manager/**/*.nix : Document all configuration options in Nix modules and programs

Applied to files:

  • home-manager/programs/zoxide/default.nix
📚 Learning: 2025-11-25T09:34:40.062Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-11-25T09:34:40.062Z
Learning: Applies to **/*.nix : Use treefmt.toml for formatting Nix files

Applied to files:

  • treefmt.toml
  • flake.nix
📚 Learning: 2025-11-25T09:34:23.224Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T09:34:23.224Z
Learning: Applies to **/*.{sh,bash} : Use shfmt with 2-space indentation for shell scripts

Applied to files:

  • treefmt.toml
📚 Learning: 2025-11-25T09:34:23.224Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T09:34:23.224Z
Learning: Applies to **/*.nix : Use nixfmt for formatting all Nix files

Applied to files:

  • treefmt.toml
  • flake.nix
📚 Learning: 2025-11-25T09:35:01.066Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/nix.mdc:0-0
Timestamp: 2025-11-25T09:35:01.066Z
Learning: Applies to home-manager/programs/**/*.nix : Program configurations in `home-manager/programs/` should be organized by program name, include all necessary dependencies, use `home.packages` for package installations, and use `programs.<name>` when available in home-manager

Applied to files:

  • treefmt.toml
📚 Learning: 2025-11-25T09:34:40.062Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-11-25T09:34:40.062Z
Learning: Applies to flake.nix : Maintain flake.nix as the main Nix configuration with proper structure

Applied to files:

  • flake.nix
📚 Learning: 2025-11-25T09:34:40.062Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-11-25T09:34:40.062Z
Learning: Document all major changes in Nix configurations

Applied to files:

  • flake.nix
📚 Learning: 2025-11-25T09:35:01.066Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/nix.mdc:0-0
Timestamp: 2025-11-25T09:35:01.066Z
Learning: Test configurations before committing using `nix flake check` and `home-manager build --show-trace`

Applied to files:

  • flake.nix
📚 Learning: 2025-11-25T09:34:23.224Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T09:34:23.224Z
Learning: Prefer Nix packages over external package managers

Applied to files:

  • flake.nix
📚 Learning: 2025-11-25T09:34:23.224Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T09:34:23.224Z
Learning: Applies to nix-darwin/**/*.nix : Use Homebrew only for macOS-specific applications

Applied to files:

  • flake.nix
📚 Learning: 2025-11-25T09:34:32.423Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/formatting.mdc:0-0
Timestamp: 2025-11-25T09:34:32.423Z
Learning: Applies to **/*.nix : Format lists and sets consistently in Nix files

Applied to files:

  • flake.nix
📚 Learning: 2025-11-25T09:34:40.062Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-11-25T09:34:40.062Z
Learning: Applies to **/*.{js,jsx,ts,tsx,json,jsonc,md} : Use Biome for code formatting as configured in biome.json

Applied to files:

  • flake.nix
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: Agent
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Mesa Review
  • GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
  • GitHub Check: e2e-run (MacOS, macos-latest)
  • GitHub Check: e2e-run (NixOS, ubuntu-latest)
  • GitHub Check: nix-nixos
  • GitHub Check: nix-linux
  • GitHub Check: docker-build-push (linux/arm64, arm64, ubuntu-24.04-arm)
  • GitHub Check: docker-build-push (linux/amd64, amd64, ubuntu-latest)
  • GitHub Check: nix-darwin
  • GitHub Check: lua-hammerspoon
  • GitHub Check: lua-neovim
🔇 Additional comments (4)
treefmt.toml (1)

14-14: LGTM! Excluding auto-generated lock files from formatting is appropriate.

This prevents the formatter from modifying machine-generated content that should remain stable for reproducibility.

home-manager/programs/neovim/nvim-pack-lock.json (1)

177-177: LGTM! Adding trailing newline follows POSIX text file conventions.

Combined with the treefmt exclusion, this lock file will now maintain a consistent format without being modified by formatters.

home-manager/programs/zoxide/default.nix (1)

5-7: LGTM! Expanding zoxide integration to Bash and Zsh is a sensible addition.

The shell integrations are properly configured using home-manager's built-in module options, and the attributes are sorted alphabetically.

flake.nix (1)

155-171: Formatter names are correctly synchronized between treefmt.toml and flake.nix.

The verification confirms that both treefmt.toml and flake.nix define/reference the identical set of formatters: biome, json, nix, and shell. The implementation is sound—using (treefmtToml.formatter.nix or { }) provides safe fallback handling if a formatter section is missing from the TOML. No synchronization issues exist in the current state.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the handling of Neovim's pack lock file by excluding it from JSON formatting, and enhances zoxide shell integration support.

Key Changes:

  • Migrated treefmt configuration from program-specific enables to a hybrid approach using TOML-based settings with Nix command path overrides
  • Added exclusion for nvim-pack-lock.json in the JSON formatter to preserve its auto-generated format
  • Removed manual newline management logic from Makefile, simplifying the Neovim sync process

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
treefmt.toml Added nvim-pack-lock.json to the JSON formatter's exclude list to prevent formatting of the auto-generated lock file
home-manager/programs/zoxide/default.nix Enabled Bash and Zsh integration for zoxide alongside existing Fish integration
home-manager/programs/neovim/nvim-pack-lock.json Added proper newline at end of file
flake.nix Refactored treefmt configuration to read from treefmt.toml and override command paths using lib.getExe for better path resolution
Makefile Removed complex platform-specific sed commands for managing nvim-pack-lock.json newlines, simplified by excluding file from formatting instead

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mesa-dot-dev mesa-dot-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed full review of 17d5b2a...b5f91d2

Analysis

  1. Configuration Duplication & Increased Maintenance Burden: The changes introduce redundancy between flake.nix and treefmt.toml, creating a dual-source-of-truth problem where formatter configurations must be manually kept in sync across two files.

  2. Inconsistent Formatter Configuration Patterns: The PR creates an architecturally inconsistent codebase with some formatters using explicit command paths while others use the simple enable flags pattern, making it unclear which approach future contributors should follow.

  3. Incomplete Lock File Strategy: While nvim-pack-lock.json is excluded from formatting, other lock files in the repository (flake.lock, bun.lock) aren't handled similarly, suggesting an incomplete architectural consideration of lock file management.

  4. Unnecessary Complexity: The flake.nix refactoring introduces significant complexity (manual parsing and overrides) to solve a problem that could be addressed with just the treefmt.toml exclusion that was already implemented.

Tip

Help

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

5 files reviewed | 1 comments | Edit Agent SettingsRead Docs

Comment thread flake.nix
};
overlays = (import ./overlays) { inherit inputs; };
};
treefmtToml = builtins.fromTOML (builtins.readFile ./treefmt.toml);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium

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 previous programs.jsonfmt.enable = true pattern was simpler and more maintainable. What specific problem does this refactoring solve?
Agent: 🏛 Architecture

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

@shunkakinoki
shunkakinoki merged commit b1db7bb into main Nov 26, 2025
33 checks passed
@shunkakinoki
shunkakinoki deleted the nvim-exclude branch November 26, 2025 15:18
@coderabbitai coderabbitai Bot mentioned this pull request Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants