Skip to content

Conversation

TheLeoP
Copy link
Contributor

@TheLeoP TheLeoP commented Aug 12, 2025

Solves #651

I'm not fully familiar with the snapshot testing. It seems like the descriptions of the default keymaps is overriding the descriptions of mini.clue for them. But, I guess this is expected (?

@echasnovski
Copy link
Member

Thanks for the PR!

Couple of high level notes:

  • Indeed an actual description of keymap has higher precedence than manual clue. This is by design. So there doesn't seem to be the need to have all the clues for built-in mappings (i.e. which are created with vim.keymap.set or alternative) themselves. Creating extra clues is needed for built-in "keymap prefix", like for built-in LSP mappings. Without these clues typing gr (if it is not mapped to anything) will show "+ xx choices" as a clue.
  • Can you please make clues as concise and consistent as possible? Like always use "Go to" instead of "Jump to", use something like #if/#else/#ifdef instead of #if, #else or #ifdef, etc.
  • Let's drop <MiddleMouse> clues. I am not sure if 'mini.clue' works with mouse clicks and it occupies too much horizontal space.

@TheLeoP
Copy link
Contributor Author

TheLeoP commented Aug 13, 2025

I totally missed that gr is used as a prefix.

I made the descriptions more concise and fixed a few mistakes on them that I missed before. I a lso tried to make them as concise as possible, but some of them are still too wide for the UI on the tests. Is there something else do you think I could remove from those descriptions?

I also made fixup commits in order to make review easier, I'll squash them later.

Copy link
Member

@echasnovski echasnovski left a comment

Choose a reason for hiding this comment

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

In general looks good after making clues even more compact.

Also please add triggers and application of this gen_clues.square_brackets to "Full starter example" in MiniClue-examples.

@TheLeoP
Copy link
Contributor Author

TheLeoP commented Aug 14, 2025

I accidentally run my autoformatter on CHANGELOG.md, I've reverted that now. Would it be ok for me to add .nvim.lua as an entry to .gitignore? I use it for personal repo by repo configuration (like disabling my autoformatter for certain filetypes) and that would make it easier no to accidentally commit it into the mini.nvim repo

@echasnovski
Copy link
Member

Would it be ok for me to add .nvim.lua as an entry to .gitignore?

Sure, but not as part of this PR. I'll do it later. Maybe there is something else that is reasonable to add there?


The documentation CI keeps failing as docs are not regenerated after changing the name to square_brackets.

@TheLeoP
Copy link
Contributor Author

TheLeoP commented Aug 14, 2025

Sure, but not as part of this PR. I'll do it later. Maybe there is something else that is reasonable to add there?

Not entirely related, but another QOL change that I just added to my config is a treesitter injections.scm capture to highlight embedded lua string from mini.test. Is that something you would be interested in adding to mini.test itself?

A final question. The default keymap descriptions for [d and [D are wider than the ones in this PR. Is it ok to test that they also fit entirely withing mini.clue's window? Or should I ignore them?

Copy link
Member

@echasnovski echasnovski left a comment

Choose a reason for hiding this comment

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

After resolving documentation comments, looks good.

Please, squash-rebase and add "Resolve #651" to commit message (similar to how it is done in 0e9d1f9, for example).

@echasnovski
Copy link
Member

Not entirely related, but another QOL change that I just added to my config is a treesitter injections.scm capture to highlight embedded lua string from mini.test. Is that something you would be interested in adding to mini.test itself?

Depends on how verbose it is, I'd rather add a mention in 'TESTING.md'.

A final question. The default keymap descriptions for [d and [D are wider than the ones in this PR. Is it ok to test that they also fit entirely withing mini.clue's window? Or should I ignore them?

Either is fine. You already updated to fit every clue, which is fine.

@TheLeoP
Copy link
Contributor Author

TheLeoP commented Aug 14, 2025

Depends on how verbose it is, I'd rather add a mention in 'TESTING.md'.

TheLeoP/nvim-config@70c556f is the commit with the full change. For reference, this allow me to see the child.lua calls like

image

@echasnovski echasnovski merged commit 301ee9f into nvim-mini:main Aug 14, 2025
11 checks passed
@echasnovski
Copy link
Member

Thanks again for the PR! Hope it was not a painful experience :)

TheLeoP/nvim-config@70c556f is the commit with the full change. For reference, this allow me to see the child.lua calls like

The result is nice, but I'd rather not add this as a query in 'mini.nvim' itself, because:

  • It is already a pretty crowded repo.
  • Injections don't have wide user base (plugin authors that use 'mini.test'), so for most 'mini.nvim' users it will be useless.
  • There is no way to have it be separate from other injections in the future.

There might be a better place for it in the future, but for now I'd not be against mentioning it as is in the 'TESTING.md'. If you want to, PR is welcome (might also contain a '.gitignore' update).

@TheLeoP TheLeoP deleted the square_bracket branch August 14, 2025 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants