Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughUpdated plugin lockfile pins and added two new lock entries; registered Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
lua/custom/plugins/init.lua (1)
5-7: Consider adding lazy-loading forcord.nvim.The plugin will load eagerly at startup. For a Discord presence plugin, consider adding
event = "VeryLazy"to defer loading and improve startup time.Suggested improvement
return { - { 'vyfor/cord.nvim' } + { 'vyfor/cord.nvim', event = "VeryLazy" } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lua/custom/plugins/init.lua` around lines 5 - 7, The plugin spec for 'vyfor/cord.nvim' is loading eagerly; update the table entry for the plugin (the object containing 'vyfor/cord.nvim') to include lazy-loading by adding event = "VeryLazy" (e.g., { 'vyfor/cord.nvim', event = "VeryLazy" }) so the Discord presence is deferred until the VeryLazy event and startup time improves; keep the same table shape and add any needed config fields after adding the event key.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@lua/custom/plugins/languages/markdown.lua`:
- Around line 27-37: The custom init currently creates user commands (via
vim.api.nvim_create_user_command) for "MarkdownPreview", "MarkdownPreviewStop",
and "MarkdownPreviewToggle" which is redundant and can error because the plugin
is filetype-lazy-loaded; remove those vim.api.nvim_create_user_command blocks
from init and instead declare the plugin to lazy-load by command by adding cmd =
{ "MarkdownPreview", "MarkdownPreviewStop", "MarkdownPreviewToggle" } to the
plugin specification so Neovim will load the plugin when any of those commands
are invoked; keep the init function only for truly necessary setup not related
to these commands.
In `@lua/kickstart/plugins/cmp.lua`:
- Around line 103-109: The "<C-k>" mapping passes an invalid opts object to
cmp.select_prev_item; replace the incorrect { select = true } with the proper
nvim-cmp option object, e.g., use { behavior = cmp.SelectBehavior.Select } when
calling cmp.select_prev_item inside the "<C-k>" mapping so it matches the cmp
API (reference cmp.select_prev_item and cmp.SelectBehavior in the mapping).
- Around line 95-101: The mapping for "<C-j>" uses an invalid parameter { select
= true } when calling cmp.select_next_item; update the function to call
cmp.select_next_item() without the unsupported argument (mirror the fix used for
the "<S-Tab>" mapping), so inside the anonymous function replace
cmp.select_next_item({ select = true }) with cmp.select_next_item().
- Around line 79-85: The keymaps calling cmp.select_prev_item() and
cmp.select_next_item() (specifically the "<S-Tab>" mapping using
cmp.select_prev_item, the "<C-j>" mapping using cmp.select_next_item, and the
"<C-k>" mapping using cmp.select_prev_item) are passing an invalid `{ select =
true }` argument; remove that argument or replace it with the proper behavior
option `{ behavior = cmp.SelectBehavior.Select }` if you intend to auto-select
items. Update the three calls to either call the functions with no parameter or
with `{ behavior = cmp.SelectBehavior.Select }` accordingly.
- Around line 87-93: Remove the redundant "<C-i>" key mapping in the cmp setup:
locate the mapping that binds ["<C-i>"] to the function that checks
cmp.visible() and calls cmp.mapping.confirm({ select = true })() or fallback(),
and either delete that mapping entry entirely or change it to a different,
intentional key/action; keep the existing "<Tab>" mapping as the primary confirm
behavior to avoid terminal keycode collisions and ensure only one key handles
completion confirmation.
---
Nitpick comments:
In `@lua/custom/plugins/init.lua`:
- Around line 5-7: The plugin spec for 'vyfor/cord.nvim' is loading eagerly;
update the table entry for the plugin (the object containing 'vyfor/cord.nvim')
to include lazy-loading by adding event = "VeryLazy" (e.g., { 'vyfor/cord.nvim',
event = "VeryLazy" }) so the Discord presence is deferred until the VeryLazy
event and startup time improves; keep the same table shape and add any needed
config fields after adding the event key.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c8196a41-c3f7-4dd0-b2ee-f1ab2bc098eb
📒 Files selected for processing (6)
lazy-lock.jsonlua/custom/plugins/init.lualua/custom/plugins/languages/markdown.lualua/keymaps.lualua/kickstart/plugins/cmp.lualua/options.lua
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
lua/custom/plugins/ai.lua (2)
41-41: Keep global editor options out of plugin-local configLine 41 mutates a global option (
autoread) as a side effect of loading this plugin. It’s cleaner and more predictable to keep this in your central options file.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lua/custom/plugins/ai.lua` at line 41, Remove the side-effect that sets the global editor option from the plugin config: delete the vim.o.autoread = true line from lua/custom/plugins/ai.lua (the vim.o.autoread symbol) and instead set autoread in your central editor options file (where you manage global vim.opt/vim.o settings) so plugin loading does not mutate global state.
47-48: Avoid overriding nativegomotion for plugin actionsLine 47 and Line 48 replace built-in
gobehavior in normal mode. This is high-friction for Vim users and can break muscle memory/plugin expectations.Suggested fix
- vim.keymap.set({ "n", "x" }, "go", function() return require("opencode").operator("@this ") end, { desc = "Add range to opencode", expr = true }) - vim.keymap.set("n", "goo", function() return require("opencode").operator("@this ") .. "_" end, { desc = "Add line to opencode", expr = true }) + vim.keymap.set({ "n", "x" }, "<leader>or", function() return require("opencode").operator("@this ") end, { desc = "Add range to opencode", expr = true }) + vim.keymap.set("n", "<leader>ol", function() return require("opencode").operator("@this ") .. "_" end, { desc = "Add line to opencode", expr = true })🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lua/custom/plugins/ai.lua` around lines 47 - 48, The mappings override Vim's native "go" motion; update the vim.keymap.set calls that bind "go" and "goo" so they do not shadow built-in motions — e.g., change the keys to a non-conflicting prefix like "<leader>go" and "<leader>goo" (or another chosen combo) for the functions that call require("opencode").operator("@this "), keeping the same options ({ desc = "...", expr = true }) and leaving the operator invocation (require("opencode").operator) unchanged so the behavior is preserved without replacing the native "go" motion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@lua/custom/plugins/ai.lua`:
- Line 44: The mapping vim.keymap.set({ "n", "x" }, "<C-x>", function()
require("opencode").select() end) conflicts with the existing core <C-x>
buffer-delete mapping defined in lua/keybinds.lua; change this opencode mapping
to a non-conflicting key (e.g., use a leader-prefixed combo like "<leader>o" or
"<leader>oc") or make it buffer-local/conditional (check for an existing mapping
before setting) so both actions remain reachable; update the mapping site in
lua/custom/plugins/ai.lua by replacing the "<C-x>" binding for
require("opencode").select() accordingly.
---
Nitpick comments:
In `@lua/custom/plugins/ai.lua`:
- Line 41: Remove the side-effect that sets the global editor option from the
plugin config: delete the vim.o.autoread = true line from
lua/custom/plugins/ai.lua (the vim.o.autoread symbol) and instead set autoread
in your central editor options file (where you manage global vim.opt/vim.o
settings) so plugin loading does not mutate global state.
- Around line 47-48: The mappings override Vim's native "go" motion; update the
vim.keymap.set calls that bind "go" and "goo" so they do not shadow built-in
motions — e.g., change the keys to a non-conflicting prefix like "<leader>go"
and "<leader>goo" (or another chosen combo) for the functions that call
require("opencode").operator("@this "), keeping the same options ({ desc =
"...", expr = true }) and leaving the operator invocation
(require("opencode").operator) unchanged so the behavior is preserved without
replacing the native "go" motion.
🪄 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: 3855f602-f506-47fd-9643-ba5305eba992
📒 Files selected for processing (2)
lazy-lock.jsonlua/custom/plugins/ai.lua
🚧 Files skipped from review as they are similar to previous changes (1)
- lazy-lock.json
Summary by CodeRabbit
New Features
Updates