mini.nvim
mini.nvim copied to clipboard
indent: When the indent marker is displayed it removes 'listchar' for tabs before it.
Contributing guidelines
- [X] I have read CONTRIBUTING.md
- [X] I have read CODE_OF_CONDUCT.md
- [X] I have updated 'mini.nvim' to latest version
Module(s)
indent
Description
When the indent marker is displayed and you use:
vim.opt.listchars = { tab = '»·', }
Then the it will remove the listchar for indented code for more than one level.

Neovim version
0.7.2
Steps to reproduce
- In your config set:
vim.opt.listchars = { tab = '»·', }
- configure mini.nvim indent
- Open source code with tabs e.g. Samba source code
Expected behavior
The listchar should not be removed by the indent marker.
Actual behavior
The listchar is removed by the indent marker. See image above.
Thanks for the issue!
Unfortunately, this is how extmarks (which are used for displaying scope) work right now, to the best of my knowledge. This is a combination of two limitations:
- Marks can only be placed beside text, but can be arbitrary width. So to enable showing scope on empty lines, extmarks are placed in the first column and have padded text for them.
- There is no way to have different priority for different parts of extmark text (highlight group - yes, priority - no). So until neovim/neovim#17366 is resolved, I can't see a way to solve this reliably. And even after that, I am not sure how priority of extmarks will interact with listchars.
Thank you very much for looking into that.
This should be fixed in latest main.
Works great, thank you very much!