Skip to content

Cmux#72

Merged
myuron merged 4 commits intomainfrom
cmux
Apr 25, 2026
Merged

Cmux#72
myuron merged 4 commits intomainfrom
cmux

Conversation

@myuron
Copy link
Copy Markdown
Owner

@myuron myuron commented Apr 24, 2026

Summary by CodeRabbit

  • New Features

    • Terminal theme and split navigation keybindings added.
    • Markdown rendering plugin integrated into the editor.
    • Neovim now sideloads init Lua for faster startup.
    • New shell abbreviation for a richer directory listing.
  • Chores

    • Added an additional CLI package to user installs and macOS casks.
    • Plugin lockfile updated and completion plugin delayed to insert/cmdline for faster load.
  • Chores

    • Home-manager now manages a dotfiles symlink for terminal config.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bb9c2e65-321a-4868-8eb7-7727528f2f0f

📥 Commits

Reviewing files that changed from the base of the PR and between 744e16a and 11933ba.

📒 Files selected for processing (1)
  • nix/home-manager/common/neovim/default.nix
✅ Files skipped from review due to trivial changes (1)
  • nix/home-manager/common/neovim/default.nix

📝 Walkthrough

Walkthrough

Adds lazycwl as a flake input and wires it into flake outputs and Home Manager overlays; introduces Ghostty config and a symlink Home Manager module; extends Homebrew casks; updates Fish abbreviations; updates Neovim plugin locks, adds md-render.nvim, lazy-loads nvim-cmp, and adjusts several Neovim keymaps.

Changes

Cohort / File(s) Summary
Flake inputs & overlays
flake.nix
Adds lazycwl input (github:myuron/lazycwl) and includes it in flake outputs inputs; extends Linux/Darwin Home Manager overlays to include lazycwl.overlays.default.
Home Manager core
nix/home-manager/common/default.nix
Imports new ./symlink module and adds lazycwl to home.packages.
Home Manager modules
nix/home-manager/common/symlink/default.nix
New module that registers home.file.".config/ghostty" sourced via mkOutOfStoreSymlink pointing into src/.../dotfiles/ghostty.
Shell config
nix/home-manager/common/fish/default.nix
Adds Fish abbreviation lt for eza -lhaT --icons --classify.
Ghostty config
ghostty/config
New Ghostty terminal config: fontSize=14, theme=tokyonight, and split/navigation keybindings.
macOS Homebrew
nix/nix-darwin/default.nix
Appends claude, cmux, and ghostty to homebrew.casks.
Neovim — locks & plugins
nvim/lazy-lock.json, nvim/lua/plugins/md-render.lua, nvim/lua/plugins/nvim-cmp.lua
Updates multiple plugin lock entries (pins, removals, additions); adds md-render.nvim plugin with budoux.lua and nvim-web-devicons deps; adds event = { "InsertEnter", "CmdlineEnter" } to nvim-cmp spec for lazy loading.
Neovim keymaps
nvim/lua/configs/keymap.lua
Changes explorer picker to picker.buffers(), remaps LSP hover to K, adds gr for references, moves diagnostics float to gK, switches diag navigation to diag.jump({ count = ±1 }), and adds Markdown mappings.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • Add: claude-code-overlay #67: Adds a flake input overlay and wires it through Home Manager overlays similarly to this change.
  • add:waybar #27: Updates nvim/lazy-lock.json plugin lock entries overlapping with the lockfile edits here.
  • fish #62: Modifies nix/home-manager/common/default.nix imports and home.packages entries related to the same area of configuration.

Poem

🐰 A lazy flake tucked in my crown,
Ghostty splits hop up and down,
Keymaps whisper, plugins sing,
Symlinks weave the dotfiles' string,
Hopping through configs — joy abounds!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Cmux' is overly vague and generic. While the PR does add cmux to homebrew.casks and introduces lazycwl, the term 'Cmux' alone is non-descriptive and fails to clearly summarize the main purpose or scope of the changeset to a teammate scanning history. Provide a more descriptive title that captures the primary change, such as 'Add cmux, claude, and ghostty with lazycwl integration' or similar, to clarify the main intent of the PR.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cmux

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (2)
nix/home-manager/common/symlink/default.nix (1)

1-9: LGTM — consider hoisting the dotfiles path for reuse.

The module correctly uses mkOutOfStoreSymlink to link ~/.config/ghostty to the in-repo ghostty/ directory. If you plan to add more out-of-store symlinks later (e.g., for other app configs), a small refactor avoids repeating the ghq path:

♻️ Optional refactor
 { config, ...}:
 let
   inherit (config.lib.file) mkOutOfStoreSymlink;
+  dotfiles = "${config.home.homeDirectory}/src/github.com/myuron/dotfiles";
 in
 {
   home.file.".config/ghostty" = {
-    source = mkOutOfStoreSymlink "${config.home.homeDirectory}/src/github.com/myuron/dotfiles/ghostty";
+    source = mkOutOfStoreSymlink "${dotfiles}/ghostty";
   };
 }

Note: If the repo isn't cloned at that exact path, the symlink will dangle silently after activation — worth keeping in mind when bootstrapping a new machine.

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

In `@nix/home-manager/common/symlink/default.nix` around lines 1 - 9, Hoist the
hard-coded repo path into a reusable variable and reference it when creating
out-of-store symlinks: introduce a local like dotfilesDir =
"${config.home.homeDirectory}/src/github.com/myuron/dotfiles"; then replace the
inline path in the home.file.".config/ghostty" source (which currently uses
mkOutOfStoreSymlink and config.home.homeDirectory) with mkOutOfStoreSymlink
"${dotfilesDir}/ghostty" so future entries can reuse dotfilesDir for other
symlinks.
flake.nix (1)

40-42: Declare lazycwl to follow the same nixpkgs as the flake.

lazycwl has a nixpkgs input but unlike claude-code-overlay (line 35), does not pin it to your flake's nixpkgs. This allows lazycwl to pull its own transitive nixpkgs, which can bloat the lock file and cause overlays to be built against a different nixpkgs version than your pinned one.

♻️ Suggested change
     lazycwl = {
       url = "github:myuron/lazycwl";
+      inputs.nixpkgs.follows = "nixpkgs";
     };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@flake.nix` around lines 40 - 42, The lazycwl flake input currently omits
following the repository's pinned nixpkgs; update the lazycwl input declaration
so it follows the same nixpkgs as this flake (make lazycwl's input include
inputs.nixpkgs.follows = "nixpkgs") to prevent it pulling its own transitive
nixpkgs and ensure overlays build against the pinned version; locate the lazycwl
input block in flake.nix (the lazycwl = { url = "github:myuron/lazycwl"; }
entry) and add the follows directive to reference the flake's nixpkgs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@nvim/lua/configs/keymap.lua`:
- Around line 125-127: The keybindings using the MdRender commands will raise
E492 because md-render.nvim's setup() is never invoked; fix by ensuring the
plugin's setup is called in the plugin spec (nvim/lua/plugins/md-render.lua) or
lazy-load the setup before mapping: update the plugin config to call
require("md-render").setup(...) or add a protected loader around the keymaps
(reference the keymap calls keymap("n", "<leader>mp", "<cmd>MdRender<CR>"),
keymap("n", "<leader>mt", "<cmd>MdRenderTab<CR>"), keymap("n", "<leader>md",
"<cmd>MdRenderDemo<CR>") ) so the plugin is initialized before those commands
are registered.
- Line 117: There's a small typo in the section comment "-- Formag" in
nvim/lua/configs/keymap.lua; update that comment to read "-- Format" so the
section header accurately reflects the formatting keymaps (look for the comment
string "Formag" near the format/formatting keymap block to replace it).
- Line 123: The mapping keymap("n", "<leader>sm", "<cmd>RenderMarkdown
toggle<CR>", ...) refers to the RenderMarkdown command from
MeanderingProgrammer/render-markdown.nvim which is not installed; either add the
plugin spec for "MeanderingProgrammer/render-markdown.nvim" (with dependency
"nvim-tree/nvim-web-devicons" and ft = {"markdown"}) into your plugin specs so
RenderMarkdown is available, or remove/change the mapping in
nvim/lua/configs/keymap.lua to point to an installed plugin/command; locate the
mapping by the keymap call referencing "<leader>sm" and update accordingly.
- Line 84: The keymap for normal mode using keymap("n", "gr", function()
lsp.references() end, ...) has an incorrect description "Hover Doc"; update the
desc to accurately reflect the action (e.g., "LSP References" or "Show
References") so which-key and command history display the correct label for the
mapping referencing lsp.references(); adjust the desc string inside the same
keymap call.

In `@nvim/lua/plugins/md-render.lua`:
- Around line 1-8: The plugin spec currently doesn't call md-render.nvim's setup
so the ex-commands (MdRender, MdRenderTab, MdRenderDemo) are never registered;
update the returned table to make the plugin lazy-load on those commands and run
its setup: add a cmd = {"MdRender","MdRenderTab","MdRenderDemo"} entry to
trigger loading, and provide either a config = function()
require("md-render").setup() end or an opts = {} (so lazy.nvim calls setup) to
run setup when loaded; keep existing dependencies intact.

---

Nitpick comments:
In `@flake.nix`:
- Around line 40-42: The lazycwl flake input currently omits following the
repository's pinned nixpkgs; update the lazycwl input declaration so it follows
the same nixpkgs as this flake (make lazycwl's input include
inputs.nixpkgs.follows = "nixpkgs") to prevent it pulling its own transitive
nixpkgs and ensure overlays build against the pinned version; locate the lazycwl
input block in flake.nix (the lazycwl = { url = "github:myuron/lazycwl"; }
entry) and add the follows directive to reference the flake's nixpkgs.

In `@nix/home-manager/common/symlink/default.nix`:
- Around line 1-9: Hoist the hard-coded repo path into a reusable variable and
reference it when creating out-of-store symlinks: introduce a local like
dotfilesDir = "${config.home.homeDirectory}/src/github.com/myuron/dotfiles";
then replace the inline path in the home.file.".config/ghostty" source (which
currently uses mkOutOfStoreSymlink and config.home.homeDirectory) with
mkOutOfStoreSymlink "${dotfilesDir}/ghostty" so future entries can reuse
dotfilesDir for other symlinks.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4569a261-7efd-4ee8-b942-dddba8e0ed80

📥 Commits

Reviewing files that changed from the base of the PR and between 27afcfb and 744e16a.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • flake.nix
  • ghostty/config
  • nix/home-manager/common/default.nix
  • nix/home-manager/common/fish/default.nix
  • nix/home-manager/common/symlink/default.nix
  • nix/nix-darwin/default.nix
  • nvim/lazy-lock.json
  • nvim/lua/configs/keymap.lua
  • nvim/lua/plugins/md-render.lua
  • nvim/lua/plugins/nvim-cmp.lua

-- Hover Document
keymap("n", "<leader>lh", function() lsp.hover() end, { desc = "Hover Doc" })
keymap("n", "K", function() lsp.hover() end, { desc = "Hover Doc" })
keymap("n", "gr", function() lsp.references() end, { desc = "Hover Doc" })
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

🧩 Analysis chain

🌐 Web query:

Neovim 0.11 default LSP keymap gr references

💡 Result:

In Neovim 0.11, the default LSP keymaps use a "gr" prefix for several common actions. These are global defaults created unconditionally when Neovim starts: - grr (Normal mode): vim.lsp.buf.references - Find references to the symbol under the cursor. - gra (Normal and Visual mode): vim.lsp.buf.code_action - Perform code actions. - grn (Normal mode): vim.lsp.buf.rename - Rename the symbol under the cursor. - gri (Normal mode): vim.lsp.buf.implementation - Go to implementation. - grt (Normal mode): vim.lsp.buf.type_definition - Go to type definition. - grx (Normal mode): vim.lsp.codelens.run - Run code lens. These can be viewed in the official documentation with :help lsp-defaults or :help grr, etc. They do not override existing user mappings. To disable, use vim.keymap.del or handle in LspAttach autocmd.

Citations:


Fix incorrect desc for LSP references mapping.

The gr keybinding calls lsp.references() but the description is labeled "Hover Doc". This will surface incorrectly in which-key and command history.

✏️ Proposed fix
-keymap("n", "gr", function() lsp.references() end, { desc = "Hover Doc" })
+keymap("n", "gr", function() lsp.references() end, { desc = "References" })
📝 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
keymap("n", "gr", function() lsp.references() end, { desc = "Hover Doc" })
keymap("n", "gr", function() lsp.references() end, { desc = "References" })
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nvim/lua/configs/keymap.lua` at line 84, The keymap for normal mode using
keymap("n", "gr", function() lsp.references() end, ...) has an incorrect
description "Hover Doc"; update the desc to accurately reflect the action (e.g.,
"LSP References" or "Show References") so which-key and command history display
the correct label for the mapping referencing lsp.references(); adjust the desc
string inside the same keymap call.

keymap("n", "<leader>la", function() lsp.code_action() end, { desc = "Code Action" })

-- Format
-- Formag
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

Nit: typo in section comment — FormagFormat.

✏️ Proposed fix
--- Formag
+-- Format
📝 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
-- Formag
-- Format
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nvim/lua/configs/keymap.lua` at line 117, There's a small typo in the section
comment "-- Formag" in nvim/lua/configs/keymap.lua; update that comment to read
"-- Format" so the section header accurately reflects the formatting keymaps
(look for the comment string "Formag" near the format/formatting keymap block to
replace it).

-- ------------------------------
-- Misc
-- ------------------------------
keymap("n", "<leader>sm", "<cmd>RenderMarkdown toggle<CR>", { desc = "Toggle Render Markdown" })
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

🏁 Script executed:

#!/bin/bash
# Confirm no other plugin in the repo registers a `RenderMarkdown` ex-command.
rg -nP --type=lua -C2 'render-?markdown\.nvim|RenderMarkdown'
fd -t f -e lua . nvim/lua/plugins | xargs rg -nP 'render-?markdown'

Repository: myuron/dotfiles

Length of output: 408


<leader>sm references a command that isn't provided by any plugin in this config.

:RenderMarkdown toggle is exposed by MeanderingProgrammer/render-markdown.nvim, not by delphinus/md-render.nvim. There is no render-markdown.nvim entry in nvim/lazy-lock.json and no matching plugin spec under nvim/lua/plugins/, so pressing <leader>sm will error with E492: Not an editor command: RenderMarkdown.

Either add the plugin or drop the mapping:

🛠 Option A — add the plugin spec
-- nvim/lua/plugins/render-markdown.lua
return {
  "MeanderingProgrammer/render-markdown.nvim",
  dependencies = { "nvim-tree/nvim-web-devicons" },
  ft = { "markdown" },
  opts = {},
}
🛠 Option B — remove the mapping
-keymap("n", "<leader>sm", "<cmd>RenderMarkdown toggle<CR>", { desc = "Toggle Render Markdown" })
📝 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
keymap("n", "<leader>sm", "<cmd>RenderMarkdown toggle<CR>", { desc = "Toggle Render Markdown" })
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nvim/lua/configs/keymap.lua` at line 123, The mapping keymap("n",
"<leader>sm", "<cmd>RenderMarkdown toggle<CR>", ...) refers to the
RenderMarkdown command from MeanderingProgrammer/render-markdown.nvim which is
not installed; either add the plugin spec for
"MeanderingProgrammer/render-markdown.nvim" (with dependency
"nvim-tree/nvim-web-devicons" and ft = {"markdown"}) into your plugin specs so
RenderMarkdown is available, or remove/change the mapping in
nvim/lua/configs/keymap.lua to point to an installed plugin/command; locate the
mapping by the keymap call referencing "<leader>sm" and update accordingly.

Comment on lines +125 to +127
keymap("n", "<leader>mp", "<cmd>MdRender<CR>")
keymap("n", "<leader>mt", "<cmd>MdRenderTab<CR>")
keymap("n", "<leader>md", "<cmd>MdRenderDemo<CR>")
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

MdRender* commands depend on md-render.nvim setup that is never invoked — see comment on nvim/lua/plugins/md-render.lua.

These three keybindings will fail with E492 unless the plugin's setup() runs. The root-cause fix is in the plugin spec (missing config/opts); flagging here so both are addressed together.

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

In `@nvim/lua/configs/keymap.lua` around lines 125 - 127, The keybindings using
the MdRender commands will raise E492 because md-render.nvim's setup() is never
invoked; fix by ensuring the plugin's setup is called in the plugin spec
(nvim/lua/plugins/md-render.lua) or lazy-load the setup before mapping: update
the plugin config to call require("md-render").setup(...) or add a protected
loader around the keymaps (reference the keymap calls keymap("n", "<leader>mp",
"<cmd>MdRender<CR>"), keymap("n", "<leader>mt", "<cmd>MdRenderTab<CR>"),
keymap("n", "<leader>md", "<cmd>MdRenderDemo<CR>") ) so the plugin is
initialized before those commands are registered.

Comment on lines +1 to +8
return {
"delphinus/md-render.nvim",
version = "*",
dependencies = {
{ "nvim-tree/nvim-web-devicons", version = "*" },
{ "delphinus/budoux.lua", version = "*" },
},
}
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 | 🔴 Critical

Plugin spec never triggers setup(), so MdRender* commands won't be registered.

lazy.nvim only calls a plugin's setup() when either opts or a config function is present on the spec. This spec has neither, so although md-render.nvim is installed and pinned in nvim/lazy-lock.json, the MdRender, MdRenderTab, and MdRenderDemo ex-commands used in nvim/lua/configs/keymap.lua (lines 125–127) are never created.

🛠 Proposed fix — trigger setup and load lazily
 return {
   "delphinus/md-render.nvim",
   version = "*",
   dependencies = {
     { "nvim-tree/nvim-web-devicons", version = "*" },
     { "delphinus/budoux.lua", version = "*" },
   },
+  cmd = { "MdRender", "MdRenderTab", "MdRenderDemo" },
+  ft = { "markdown" },
+  opts = {},
 }
delphinus md-render.nvim setup commands MdRender MdRenderTab
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nvim/lua/plugins/md-render.lua` around lines 1 - 8, The plugin spec currently
doesn't call md-render.nvim's setup so the ex-commands (MdRender, MdRenderTab,
MdRenderDemo) are never registered; update the returned table to make the plugin
lazy-load on those commands and run its setup: add a cmd =
{"MdRender","MdRenderTab","MdRenderDemo"} entry to trigger loading, and provide
either a config = function() require("md-render").setup() end or an opts = {}
(so lazy.nvim calls setup) to run setup when loaded; keep existing dependencies
intact.

…OfStoreSymlink

home-manager の files: handle overlapping file targets 変更で
.config/nvim 配下の処理順が変わり、シンボリックリンク先を realpath が
$HOME 外に解決して home-manager-files のビルドが失敗していた。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@myuron myuron merged commit 8b32b53 into main Apr 25, 2026
3 checks passed
@myuron myuron deleted the cmux branch April 25, 2026 15:34
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