nvim-mini / nvim-mini/mini.nvim

'mini.nvim' and multicursor

Open
#2,546 13 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ALL neovim-upstream
Dominant language
Lua
Stars
9.5k
Forks
310
Avg merge
4h 16m
Merged PRs (30d)
1

Description

Neovim>=0.13 is planned to have multicursor functionality (neovim/neovim#41587), which introduces a visible amount of issues with 'mini.nvim' compatibility. This issue is meant to track them until they are resolved:

  • 'mini.clue' overrides a Q mapping to correctly replay the latest recording. This mirrors the built-in Q, but that has been repurposed for multicursor. The best solution is still merging upstream neovim/neovim#24565, but in the meantime not overriding Q is good enough. This should be solved on latest main by just not creating both @ and Q custom mappings altogether. It seems that everything works without them present 🤞
  • 'mini.basics' overrides built-in <C-l> mapping ("clear" action, including now multicursors) for a window navigation. I still think that it is better suited for window navigation, so probably creating something like <Esc> to serve as "clear" is reasonable. This should be solved on latest main by 'mini.basics' creating a <C-c> basic mapping for "Stop, clear, redraw".
  • 'mini.bracketed' overrides [C and ]C multicursor navigation mappings (those are first/last comment). I don't like the idea of changing the suffix for comment target (breaking change). Instead adding a dedicated target for multicursor might be an option.
  • Most parts of 'mini.surround' ("add" operator in Normal and Visual mode, actions) and (at least) ? textobject in 'mini.ai' don't fully work during multicursor editing. The reason is very technical and comes down to how their operators/textobjects interact with the new CmdAtom event. I'll have to take a closer look about how to best approach this. It seems that this would require a middle-sized refactor of affected 'mini.nvim' functionality.
  • At least some parts of 'mini.move' is affected. Like horizontal charwise movement of the visual selection.
  • Visually selecting 'mini.ai' textobjects only selects the main cursor and not extra cursors.
  • Highlighting of 'mini.cursorword' is drawn on top of multicursor highlighting. This is an upstream Neovim issue (neovim/neovim#41629) that can not be solved in 'mini.cursorword', It also affects at least search and spelling highlights.

This is meant as a tracking issue for maintainers and public. For an unintended behavior that is not listed here, please create a separate issue (which can be discussed there and then listed here).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the listed multicursor compatibility areas in mini.bracketed, mini.surround, mini.ai, mini.move, and mini.cursorword, along with the referenced Neovim multicursor issues. Reproduce each affected behavior and determine whether it needs a targeted fix, a refactor, or upstream resolution; done means the listed compatibility problems are resolved or split into actionable issues.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
devtools
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.