What
lua/config/plugin_config.lua:336–341 maps ]c / [c (and ]C / [C) to treesitter-textobjects "next/prev class start/end" via nvim-treesitter-textobjects.move. These are global normal-mode keymaps.
Vim's built-in ]c / [c jump to the next/previous diff change in diff mode (:help ]c). Once the treesitter-textobjects mapping is registered, diff-mode navigation via ]c / [c is silently broken for any buffer that loads the treesitter-textobject module.
Where
lua/config/plugin_config.lua:336 — ]c → goto_next_start("@class.outer")
lua/config/plugin_config.lua:339 — [c → goto_previous_start("@class.outer")
Why it matters
The config already maps ]g / [g to gitsigns hunk navigation, so the common use case (git hunk jumping) is covered. But Neovim's native ]c / [c are also used in:
:diffthis / vimdiff workflows
DiffviewOpen with a split showing actual diff buffers (diffview uses native diff mode internally)
In those contexts, ]c will jump to a class boundary instead of the next diff change, which is silently wrong and hard to diagnose.
Recommended action
Remap the class textobjects to keys that don't collide with built-in diff navigation. Common alternatives:
-- option A: use ]a / [a (currently unbound)
vim.keymap.set({"n","x","o"}, "]a", function() move.goto_next_start("@class.outer", ...) end)
vim.keymap.set({"n","x","o"}, "[a", function() move.goto_previous_start("@class.outer", ...) end)
-- option B: add a mode guard so ]c only applies outside diff mode
vim.keymap.set({"n","x","o"}, "]c", function()
if vim.wo.diff then
vim.cmd("normal! ]c")
else
move.goto_next_start("@class.outer", "textobjects")
end
end)
Option B preserves the muscle memory of ]c for class jumps while restoring diff behaviour.
What
lua/config/plugin_config.lua:336–341maps]c/[c(and]C/[C) to treesitter-textobjects "next/prev class start/end" vianvim-treesitter-textobjects.move. These are global normal-mode keymaps.Vim's built-in
]c/[cjump to the next/previous diff change in diff mode (:help ]c). Once the treesitter-textobjects mapping is registered, diff-mode navigation via]c/[cis silently broken for any buffer that loads the treesitter-textobject module.Where
lua/config/plugin_config.lua:336—]c→goto_next_start("@class.outer")lua/config/plugin_config.lua:339—[c→goto_previous_start("@class.outer")Why it matters
The config already maps
]g/[gto gitsigns hunk navigation, so the common use case (git hunk jumping) is covered. But Neovim's native]c/[care also used in::diffthis/vimdiffworkflowsDiffviewOpenwith a split showing actual diff buffers (diffview uses native diff mode internally)In those contexts,
]cwill jump to a class boundary instead of the next diff change, which is silently wrong and hard to diagnose.Recommended action
Remap the class textobjects to keys that don't collide with built-in diff navigation. Common alternatives:
Option B preserves the muscle memory of
]cfor class jumps while restoring diff behaviour.