Skip to content

fix(nvim): resolve healthcheck warnings and add missing formatter tools - #1561

Merged
shunkakinoki merged 16 commits into
mainfrom
fix/nvim-healthcheck
Apr 23, 2026
Merged

fix(nvim): resolve healthcheck warnings and add missing formatter tools#1561
shunkakinoki merged 16 commits into
mainfrom
fix/nvim-healthcheck

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Apr 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add lsof and tree-sitter to packages/default.nix
  • Add formatter tools to language program dirs: goimports (go), nixfmt-rfc-style (nix), stylua (lua), black (python)
  • Fix fidget notification.window.avoid to include NvimTree
  • Update nvim-pack-lock.json via make neovim-update (68 plugins)

Test plan

  • make switch completes cleanly
  • :checkhealth conform shows no unavailable formatter warnings
  • :checkhealth fidget shows no NvimTree integration warning
  • :checkhealth opencode and :checkhealth sidekick show lsof found
  • :checkhealth nvim-treesitter shows tree-sitter-cli found
  • :checkhealth vim.pack shows no stale revision errors

Summary by cubic

Fixes Neovim healthcheck warnings, enforces zero keymap overlaps in CI, and installs missing formatter/LSP tools. Enables Copilot suggestions, adds image/TeX tools, moves Docker/K8s into modules, and applies per-host Claude overrides.

  • New Features

    • Add formatters/LSPs: goimports via gotools, nixfmt, stylua, black; dockerfile-language-server, vscode-langservers-extracted, vtsls.
    • Enable Copilot suggestions; CI which-key overlap check in make lua-check-neovim; install imagemagick, ghostscript, mermaid-cli, tectonic; per-host Claude overrides in activate.sh.
  • Bug Fixes

    • Tooling: add lsof, tree-sitter; configure fidget to avoid NvimTree; update nvim-pack-lock.json; use low-priority gotools; move Docker packages to programs/docker and Kubernetes tools to programs/k8s; rename Docker LSP pkg; switch nixfmt-rfc-style to nixfmt; migrate nvim-surround to v4 API and remove duplicate setup; fix SC2155 in scripts/llm-update.sh.
    • Keymaps: eliminate all overlaps; move Git hunk actions to <leader>H, rename wipe-all to <leader>BD, move annotation to <leader>ca, change line diagnostics to <leader>xd; disable conflicting mappings (nvim-surround yss/ySS, built-in gcc); NvimTree: y/d/c -> Y/D/C (relative path on <C-y>); keep <leader>h for kill terminal.

Written for commit 6411fa3. Summary will update on new commits.

- Add lsof, tree-sitter to packages
- Add goimports, nixfmt-rfc-style, stylua, black to lang program dirs
- Fix fidget notification.window.avoid for NvimTree
- Update nvim-pack-lock.json via make neovim-update (68 plugins)
@mesa-dot-dev

mesa-dot-dev Bot commented Apr 23, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@coderabbitai

coderabbitai Bot commented Apr 23, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds headless Neovim which-key health checks to the Makefile; Claude activation now merges host-specific overrides; Home Manager gains Docker and K8s modules, package list changes, Neovim keymap and plugin config updates, and several tooling/language-server additions.

Changes

Cohort / File(s) Summary
Neovim validation
Makefile
Adds headless Neovim checkhealth which-key step that creates a temp Lua file, runs nvim headless, filters WARNING lines for keymap overlaps, and fails the target when overlaps exist.
Claude configuration
config/claude/activate.sh, config/claude/settings.json
Activation script now merges hostOverrides[hostname] into root settings via jq and writes ~/.claude/settings.json; settings.json adds hostOverrides for host "matic".
Home Manager package set
home-manager/packages/default.nix, home-manager/programs/default.nix
Removes several k8s/docker items from base list; adds utilities (lsof, tree-sitter, ghostscript, imagemagick, mermaid-cli, tectonic) and imports new docker and k8s program modules.
Language servers & tooling modules
home-manager/programs/docker/default.nix, home-manager/programs/k8s/default.nix, home-manager/programs/go/default.nix, home-manager/programs/lua/default.nix, home-manager/programs/node/default.nix, home-manager/programs/nix/default.nix, home-manager/programs/python/default.nix
Adds new docker and k8s modules; go module now accepts lib and installs gotools with lowPrio; lua adds stylua; node adds vscode-langservers-extracted and vtsls; nix adds nixfmt; python adds black.
Neovim configuration & keymaps
home-manager/programs/neovim/lua/config/keymaps.lua, .../completion.lua, .../ui.lua, .../ai.lua, .../treesitter.lua
Rebinds multiple leader mappings (buffer wipe → <leader>BD, Gitsigns hunk group → <leader>H*, diagnostics → <leader>xd, Neogen → <leader>ca), enables Copilot inline suggestions, adjusts nvim-tree keybindings, configures fidget.nvim avoid list, removes goo binding and nvim-surround setup.
Neovim plugin lockfile
home-manager/programs/neovim/nvim-pack-lock.json
Updates pinned commits (rev) for several plugins including LuaSnip, copilot.lua, nvim-tree.lua, treesitter, telescope, etc.
Scripts
scripts/llm-update.sh
Minor refactor of add_model_override: separates local placeholder declaration and assignment.

Sequence Diagram(s)

sequenceDiagram
  participant Makefile as Makefile
  participant Shell as Shell
  participant Neovim as Neovim(headless)
  participant WhichKey as which-key

  rect rgba(200,230,255,0.5)
  Makefile->>Shell: create temp Lua file (keymap dump)
  Shell->>Neovim: run nvim -u minimal -c 'luafile /tmp/...' -c 'checkhealth which-key' -c 'qall'
  Neovim->>WhichKey: run which-key health checks
  WhichKey-->>Neovim: health output (stdout)
  Neovim-->>Shell: stdout
  end

  rect rgba(200,255,220,0.5)
  Shell->>Shell: filter WARNING lines for "overlap"
  Shell-->>Makefile: exit non-zero + print "❌ Keymap overlaps found" if warnings present
  Shell-->>Makefile: or print "✅ No keymap overlaps"
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

🐰 Hoppity hops, configs align,
Keys remapped in tidy line,
Neovim checks peep for overlap clues,
Docker, K8s, and formatters join the news,
A rabbit cheers — dotfiles bloom anew! 🌱

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: fixing Neovim healthcheck warnings and adding missing formatter tools, which aligns with the bulk of changes in the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description clearly outlines the changeset including formatter tools, package updates, keymap adjustments, and Neovim healthcheck fixes, directly matching the provided changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/nvim-healthcheck

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 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 updates the home-manager configuration by adding several utility packages and formatters, including lsof, tree-sitter, goimports, stylua, nixfmt-rfc-style, and black. Additionally, it modifies the fidget.nvim configuration to prevent notifications from overlapping with NvimTree and updates multiple Neovim plugin revisions in the lockfile. I have no feedback to provide.

@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 7 files

@mesa-dot-dev

mesa-dot-dev Bot commented Apr 23, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Resolves Neovim healthcheck warnings, installs missing formatter and LSP tools, and addresses keymap overlaps. This PR also enables Copilot suggestions, adds image/TeX tools, refactors Docker and Kubernetes configurations into dedicated modules, and implements per-host Claude overrides.

What changed?

  • Core Tooling & Packages:
    • home-manager/packages/default.nix: Removed Kubernetes and Docker packages; added lsof, tree-sitter, ghostscript, imagemagick, mermaid-cli, and tectonic.
    • home-manager/programs/default.nix: Enabled new docker and k8s program configurations.
    • home-manager/programs/docker/default.nix: New module providing docker, docker-compose, and dockerfile-language-server.
    • home-manager/programs/k8s/default.nix: New module for Kubernetes tools (k9s, kind, kubeconform, kubectl, kubectx, kubernetes-helm, kustomize).
  • Neovim Configuration:
    • home-manager/programs/neovim/nvim-pack-lock.json: Updated to reflect changes in plugin versions.
    • home-manager/programs/neovim/lua/config/ui.lua: Remapped NvimTree keybindings (e.g., d to D, y to Y) and adjusted fidget.nvim to avoid NvimTree overlaps.
    • home-manager/programs/neovim/lua/config/completion.lua: Enabled GitHub Copilot inline suggestions.
    • home-manager/programs/neovim/lua/config/keymaps.lua: Refactored leader key prefixes, disabled nvim-surround's yss/ySS and built-in gcc keymaps, and updated Which-key group for Git hunks.
    • home-manager/programs/neovim/lua/config/ai.lua: Removed the goo keymap for opencode sessions.
    • home-manager/programs/neovim/lua/config/treesitter.lua: Removed nvim-surround plugin configuration.
  • Formatter & LSP Tools:
    • home-manager/programs/go/default.nix: Included gotools with low priority.
    • home-manager/programs/lua/default.nix: Added stylua package.
    • home-manager/programs/nix/default.nix: Added nixfmt package.
    • home-manager/programs/python/default.nix: Added black code formatter.
    • home-manager/programs/node/default.nix: Added vscode-langservers-extracted and vtsls.
  • CI & Scripting:
    • Makefile: Added a new nvim --headless -c 'checkhealth which-key' step to lua-check-neovim to detect keymap overlaps and fail the build if warnings exist.
    • scripts/llm-update.sh: Fixed SC2155 in the add_model_override function by separating variable declaration and assignment.
  • Claude Configuration:
    • config/claude/activate.sh: Modified to dynamically merge host-specific overrides from settings.json using jq.
    • config/claude/settings.json: Added hostOverrides to disable the mempalace@mempalace plugin for the matic host.

Description generated by Mesa. Update settings

…arning

- Use lib.lowPrio gotools to avoid conflict with ruby bundle binary
- Rename nixfmt-rfc-style to nixfmt per deprecation warning
- Enable copilot suggestion in completion.lua
- Add dockerfile-language-server to new programs/docker/
- Add vscode-langservers-extracted, vtsls to programs/node/
- Add imagemagick, ghostscript, mermaid-cli to isDesktop packages

@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.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="home-manager/programs/neovim/lua/config/completion.lua">

<violation number="1" location="home-manager/programs/neovim/lua/config/completion.lua:76">
P2: Keep copilot.lua inline suggestions disabled when using copilot-cmp; enabling them can interfere with cmp completions.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

-- From: https://github.com/zbirenbaum/copilot.lua
require("copilot").setup({
suggestion = { enabled = false },
suggestion = { enabled = true },

@cubic-dev-ai cubic-dev-ai Bot Apr 23, 2026

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.

P2: Keep copilot.lua inline suggestions disabled when using copilot-cmp; enabling them can interfere with cmp completions.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At home-manager/programs/neovim/lua/config/completion.lua, line 76:

<comment>Keep copilot.lua inline suggestions disabled when using copilot-cmp; enabling them can interfere with cmp completions.</comment>

<file context>
@@ -73,7 +73,7 @@ cmp.setup.cmdline(":", {
 -- From: https://github.com/zbirenbaum/copilot.lua
 require("copilot").setup({
-	suggestion = { enabled = false },
+	suggestion = { enabled = true },
 	panel = { enabled = false },
 })
</file context>
Suggested change
suggestion = { enabled = true },
suggestion = { enabled = false },
Fix with Cubic

- Rename <leader>bad to <leader>BD (wipe all buffers)
- Rename <leader>h kill terminal to <leader>kt
- Rename gco generate annotation to <leader>ca
- Add which-key overlap check to lua-check-neovim Makefile target

@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: 2

🧹 Nitpick comments (3)
home-manager/programs/neovim/lua/config/ui.lua (1)

158-164: Indentation inconsistency — likely to fail stylua check.

The rest of this file is indented with tabs, but the new fidget.setup(...) block uses 2-space indentation. Since this PR also adds stylua to home-manager/programs/lua/default.nix, running stylua on this file will reformat these lines. Consider re-indenting with tabs to match surrounding style and avoid a noisy follow-up reformat commit.

🔧 Proposed fix
 require("fidget").setup({
-  notification = {
-    window = {
-      avoid = { "NvimTree" },
-    },
-  },
+	notification = {
+		window = {
+			avoid = { "NvimTree" },
+		},
+	},
 })
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@home-manager/programs/neovim/lua/config/ui.lua` around lines 158 - 164, The
new fidget setup block uses 2-space indentation while the rest of the file uses
tabs, which will fail stylua; update the indentation for the
require("fidget").setup({ ... }) block to use tabs consistent with surrounding
code (match existing tab-based indentation around UI config) so stylua produces
no changes and the formatter/linters remain satisfied.
Makefile (1)

936-944: Overlap check is informational-only — consider surfacing unexpected overlaps as failures.

The check prints overlaps but always succeeds, which means genuine keymap conflicts introduced later will not fail CI — only visual inspection of logs would catch them. If the intent is just to surface output (as the message suggests), this is fine; but if you want this to be a real guard, filter out the known/expected operator patterns (gc, gcc, go, goo, ys, yss, etc.) and exit 1 when anything else remains.

Also minor: grep "WARNING" could match unrelated which-key warnings; anchoring via grep -E '^- WARNING' (the standard :checkhealth prefix) would be slightly more robust.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 936 - 944, The current Makefile keymap check captures
any which-key "WARNING" lines into OVERLAPS but never fails CI; modify the shell
block that defines OVERLAPS to (1) anchor the which-key match (use grep -E '^-
WARNING' instead of grep "WARNING"), (2) filter out the known operator patterns
(gc, gcc, go, goo, ys, yss, etc.) from the results before deciding, and (3) if
any remaining overlaps exist, print them and call exit 1 so the Makefile target
fails CI; update the echo messages accordingly and keep the variable name
OVERLAPS and the same nvim headless invocation to locate the change.
home-manager/programs/default.nix (1)

13-16: Nit: docker is out of alphabetical order.

The rest of the module list is alphabetized; docker should come after direnv, not between dart and delta. Same issue in the output list at line 63.

Proposed reordering
   dart = import ./dart;
-  docker = import ./docker;
   delta = import ./delta;
   direnv = import ./direnv;
+  docker = import ./docker;
   elixir = import ./elixir;
   dart
-  docker
   delta
   direnv
+  docker
   elixir
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@home-manager/programs/default.nix` around lines 13 - 16, Reorder the module
imports and the corresponding output list so entries are alphabetized: move the
docker import to follow direnv (i.e., dart, delta, direnv, docker -> dart,
delta, direnv, docker) and make the same change in the output list where docker
currently sits out of order; update the blocks that reference dart, delta,
direnv, docker to maintain consistent alphabetical ordering.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@config/claude/activate.sh`:
- Around line 8-12: The current script uses mktemp outside ~/.claude which can
cause mv to copy+unlink across filesystems and doesn't clean up on jq failure;
change to create the temporary file in the target directory (use mktemp with the
same directory as ~/.claude/settings.json or construct a temp name in
$HOME/.claude), run jq to write to that temp, check jq exit status and on
failure remove the temp (rm -f $_TMP), and on success use mv -f $_TMP
~/.claude/settings.json to replace atomically; also add a trap to rm -f $_TMP on
exit/error to ensure cleanup; reference symbols: mktemp, $_TMP, jq,
SETTINGS_JSON, ~/.claude/settings.json, mv -f, rm -f, and trap.

In `@home-manager/programs/neovim/lua/config/completion.lua`:
- Around line 73-78: The current copilot setup enables inline suggestions
(suggestion.enabled = true) which contradicts the comment, breaks the test
(completion_spec.lua assertions expecting false) and conflicts with copilot-cmp
usage; change the copilot configuration in copilot.setup to set
suggestion.enabled = false, update or remove the stale comment about "disabled
by default", and ensure copilot_cmp.setup() + the { name = "copilot" } entry in
cmp.config.sources remain compatible (i.e., disable inline(gottxt) suggestions
via suggestion.enabled so only copilot-cmp provides completions) and then adjust
completion_spec.lua expectations if you intend to keep inline suggestions
enabled in a different test setup.

---

Nitpick comments:
In `@home-manager/programs/default.nix`:
- Around line 13-16: Reorder the module imports and the corresponding output
list so entries are alphabetized: move the docker import to follow direnv (i.e.,
dart, delta, direnv, docker -> dart, delta, direnv, docker) and make the same
change in the output list where docker currently sits out of order; update the
blocks that reference dart, delta, direnv, docker to maintain consistent
alphabetical ordering.

In `@home-manager/programs/neovim/lua/config/ui.lua`:
- Around line 158-164: The new fidget setup block uses 2-space indentation while
the rest of the file uses tabs, which will fail stylua; update the indentation
for the require("fidget").setup({ ... }) block to use tabs consistent with
surrounding code (match existing tab-based indentation around UI config) so
stylua produces no changes and the formatter/linters remain satisfied.

In `@Makefile`:
- Around line 936-944: The current Makefile keymap check captures any which-key
"WARNING" lines into OVERLAPS but never fails CI; modify the shell block that
defines OVERLAPS to (1) anchor the which-key match (use grep -E '^- WARNING'
instead of grep "WARNING"), (2) filter out the known operator patterns (gc, gcc,
go, goo, ys, yss, etc.) from the results before deciding, and (3) if any
remaining overlaps exist, print them and call exit 1 so the Makefile target
fails CI; update the echo messages accordingly and keep the variable name
OVERLAPS and the same nvim headless invocation to locate the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4f4dffa7-a47b-4a6d-b37e-5cf20f85b0d6

📥 Commits

Reviewing files that changed from the base of the PR and between 0d9bb2a and 7342b52.

📒 Files selected for processing (15)
  • Makefile
  • config/claude/activate.sh
  • config/claude/settings.json
  • home-manager/packages/default.nix
  • home-manager/programs/default.nix
  • home-manager/programs/docker/default.nix
  • home-manager/programs/go/default.nix
  • home-manager/programs/lua/default.nix
  • home-manager/programs/neovim/lua/config/completion.lua
  • home-manager/programs/neovim/lua/config/keymaps.lua
  • home-manager/programs/neovim/lua/config/ui.lua
  • home-manager/programs/neovim/nvim-pack-lock.json
  • home-manager/programs/nix/default.nix
  • home-manager/programs/node/default.nix
  • home-manager/programs/python/default.nix

Comment thread config/claude/activate.sh
Comment on lines +8 to +12
_TMP=$(mktemp)
jq --arg host "$(hostname)" '
. * (.hostOverrides[$host] // {}) | del(.hostOverrides)
' "$SETTINGS_JSON" > "$_TMP"
mv "$_TMP" ~/.claude/settings.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Keep the generated settings write atomic and non-interactive.

mktemp defaults outside ~/.claude, so mv may degrade to copy+unlink across filesystems. Also use mv -f and clean up the temp file on jq failure.

Proposed fix
-_TMP=$(mktemp)
+_TMP=$(mktemp "$HOME/.claude/settings.json.XXXXXX")
+trap 'rm -f "$_TMP"' EXIT
 jq --arg host "$(hostname)" '
   . * (.hostOverrides[$host] // {}) | del(.hostOverrides)
 ' "$SETTINGS_JSON" > "$_TMP"
-mv "$_TMP" ~/.claude/settings.json
+mv -f "$_TMP" "$HOME/.claude/settings.json"
+trap - EXIT

As per coding guidelines, **/*.{sh,bash}: Always use non-interactive flags with file operations (cp -f, mv -f, rm -f, rm -rf, cp -rf) to avoid hanging on confirmation prompts.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
_TMP=$(mktemp)
jq --arg host "$(hostname)" '
. * (.hostOverrides[$host] // {}) | del(.hostOverrides)
' "$SETTINGS_JSON" > "$_TMP"
mv "$_TMP" ~/.claude/settings.json
_TMP=$(mktemp "$HOME/.claude/settings.json.XXXXXX")
trap 'rm -f "$_TMP"' EXIT
jq --arg host "$(hostname)" '
. * (.hostOverrides[$host] // {}) | del(.hostOverrides)
' "$SETTINGS_JSON" > "$_TMP"
mv -f "$_TMP" "$HOME/.claude/settings.json"
trap - EXIT
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/claude/activate.sh` around lines 8 - 12, The current script uses
mktemp outside ~/.claude which can cause mv to copy+unlink across filesystems
and doesn't clean up on jq failure; change to create the temporary file in the
target directory (use mktemp with the same directory as ~/.claude/settings.json
or construct a temp name in $HOME/.claude), run jq to write to that temp, check
jq exit status and on failure remove the temp (rm -f $_TMP), and on success use
mv -f $_TMP ~/.claude/settings.json to replace atomically; also add a trap to rm
-f $_TMP on exit/error to ensure cleanup; reference symbols: mktemp, $_TMP, jq,
SETTINGS_JSON, ~/.claude/settings.json, mv -f, rm -f, and trap.

Comment on lines 73 to 78
-- GitHub Copilot helper with inline suggestions disabled by default.
-- From: https://github.com/zbirenbaum/copilot.lua
require("copilot").setup({
suggestion = { enabled = false },
suggestion = { enabled = true },
panel = { enabled = false },
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

copilot-cmp README recommendation on copilot.lua suggestion.enabled setting

💡 Result:

The copilot-cmp README recommends disabling the suggestion module in copilot.lua when using copilot-cmp. Specifically, set suggestion.enabled = false (along with panel.enabled = false) in the copilot.lua setup to prevent interference with completions appearing properly in the nvim-cmp menu provided by copilot-cmp.

Citations:


🏁 Script executed:

# Check if the file exists and examine lines 73-78
if [ -f "home-manager/programs/neovim/lua/config/completion.lua" ]; then
  echo "=== completion.lua lines 70-80 ==="
  sed -n '70,80p' "home-manager/programs/neovim/lua/config/completion.lua"
else
  find . -name "completion.lua" -type f | head -5
fi

Repository: shunkakinoki/dotfiles

Length of output: 377


🏁 Script executed:

# Check the test file for assertion about suggestion.enabled
if [ -f "home-manager/programs/neovim/tests/completion_spec.lua" ]; then
  echo "=== completion_spec.lua lines 135-145 ==="
  sed -n '135,145p' "home-manager/programs/neovim/tests/completion_spec.lua"
else
  find . -name "completion_spec.lua" -type f | head -5
fi

Repository: shunkakinoki/dotfiles

Length of output: 447


🏁 Script executed:

# Check for copilot-cmp configuration at lines 6 and 39 in completion.lua
if [ -f "home-manager/programs/neovim/lua/config/completion.lua" ]; then
  echo "=== completion.lua lines 1-50 (to find copilot-cmp usage) ==="
  sed -n '1,50p' "home-manager/programs/neovim/lua/config/completion.lua"
fi

Repository: shunkakinoki/dotfiles

Length of output: 1640


Stale comment, failing test, and configuration conflicts with copilot-cmp upstream guidance.

Three issues with suggestion.enabled = true:

  1. Stale comment: Line 73 claims inline suggestions are "disabled by default" but the code enables them.
  2. Test will fail: completion_spec.lua:139-140 asserts suggestion.enabled = false; this assertion fails with the current code.
  3. Upstream conflict: copilot-cmp README recommends disabling suggestion.enabled when using copilot-cmp to prevent ghost text and menu suggestions from conflicting. The code sets copilot_cmp.setup() (line 6) and includes { name = "copilot" } in cmp.config.sources (line 39), making the dual activation problematic.
🔧 Proposed fix
-- GitHub Copilot helper with inline suggestions disabled by default.
+-- GitHub Copilot helper configured for nvim-cmp.
 -- From: https://github.com/zbirenbaum/copilot.lua
 require("copilot").setup({
-	suggestion = { enabled = true },
+	suggestion = { enabled = false },
 	panel = { enabled = false },
 })

Ensure completion_spec.lua:139-140 test expectations align with this change.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@home-manager/programs/neovim/lua/config/completion.lua` around lines 73 - 78,
The current copilot setup enables inline suggestions (suggestion.enabled = true)
which contradicts the comment, breaks the test (completion_spec.lua assertions
expecting false) and conflicts with copilot-cmp usage; change the copilot
configuration in copilot.setup to set suggestion.enabled = false, update or
remove the stale comment about "disabled by default", and ensure
copilot_cmp.setup() + the { name = "copilot" } entry in cmp.config.sources
remain compatible (i.e., disable inline(gottxt) suggestions via
suggestion.enabled so only copilot-cmp provides completions) and then adjust
completion_spec.lua expectations if you intend to keep inline suggestions
enabled in a different test setup.

@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.

1 issue found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="home-manager/programs/neovim/lua/config/keymaps.lua">

<violation number="1" location="home-manager/programs/neovim/lua/config/keymaps.lua:400">
P2: This nvim-surround override is reset later by the existing `setup()` call in `treesitter.lua`, so the disabled keymaps never take effect.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread home-manager/programs/neovim/lua/config/keymaps.lua Outdated
@cubic-dev-ai

cubic-dev-ai Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

You're iterating quickly on this pull request. To help protect your rate limits, cubic has paused automatic reviews on new pushes for now—when you're ready for another review, comment @cubic-dev-ai review.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
home-manager/programs/neovim/lua/config/keymaps.lua (1)

160-215: ⚠️ Potential issue | 🟠 Major

Resolve the remaining <leader>gs duplicate.

Line 215 overwrites the Git status mapping from Line 161, so <leader>gs no longer opens :tab Git. Consider keeping gs for status and moving the index diff split to an unused Git key.

🐛 Proposed fix
 -- `@keymap` <leader>gs: Fugitive vertical diff split (current file vs index)
-keymap("n", "<leader>gs", ":Gvdiffsplit<cr>", { noremap = true, silent = true, desc = "Diff split (index)" })
+-- `@keymap` <leader>gi: Fugitive vertical diff split (current file vs index)
+keymap("n", "<leader>gi", ":Gvdiffsplit<cr>", { noremap = true, silent = true, desc = "Diff split (index)" })
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@home-manager/programs/neovim/lua/config/keymaps.lua` around lines 160 - 215,
There are two conflicting keymap registrations for "<leader>gs": keymap("n",
"<leader>gs", ":tab Git<cr>", ...) and later keymap("n", "<leader>gs",
":Gvdiffsplit<cr>", ...), which overwrites the Git status mapping; fix by
renaming the second mapping to an unused Git key (e.g. change the second call to
keymap("n", "<leader>gS", ":Gvdiffsplit<cr>", { ... }) and update its desc to
"Diff split (index)"), ensuring the original keymap("n", "<leader>gs", ":tab
Git<cr>", ...) remains unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@home-manager/programs/neovim/lua/config/keymaps.lua`:
- Around line 160-215: There are two conflicting keymap registrations for
"<leader>gs": keymap("n", "<leader>gs", ":tab Git<cr>", ...) and later
keymap("n", "<leader>gs", ":Gvdiffsplit<cr>", ...), which overwrites the Git
status mapping; fix by renaming the second mapping to an unused Git key (e.g.
change the second call to keymap("n", "<leader>gS", ":Gvdiffsplit<cr>", { ... })
and update its desc to "Diff split (index)"), ensuring the original keymap("n",
"<leader>gs", ":tab Git<cr>", ...) remains unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 114bcbd0-d64c-4ec0-b9fb-fc2aa4958b54

📥 Commits

Reviewing files that changed from the base of the PR and between 7342b52 and 887ba68.

📒 Files selected for processing (11)
  • Makefile
  • config/claude/activate.sh
  • home-manager/packages/default.nix
  • home-manager/programs/default.nix
  • home-manager/programs/docker/default.nix
  • home-manager/programs/k8s/default.nix
  • home-manager/programs/neovim/lua/config/ai.lua
  • home-manager/programs/neovim/lua/config/keymaps.lua
  • home-manager/programs/neovim/lua/config/treesitter.lua
  • home-manager/programs/neovim/lua/config/ui.lua
  • scripts/llm-update.sh
💤 Files with no reviewable changes (2)
  • home-manager/programs/neovim/lua/config/treesitter.lua
  • home-manager/programs/neovim/lua/config/ai.lua
✅ Files skipped from review due to trivial changes (4)
  • home-manager/programs/k8s/default.nix
  • home-manager/programs/docker/default.nix
  • home-manager/programs/default.nix
  • scripts/llm-update.sh
🚧 Files skipped from review as they are similar to previous changes (4)
  • config/claude/activate.sh
  • Makefile
  • home-manager/programs/neovim/lua/config/ui.lua
  • home-manager/packages/default.nix

@shunkakinoki
shunkakinoki merged commit 44a0d1c into main Apr 23, 2026
23 of 27 checks passed
@shunkakinoki
shunkakinoki deleted the fix/nvim-healthcheck branch April 23, 2026 16:29
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.

1 participant