echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.74k stars 179 forks source link

Make "show indent guide on wrapped lines" configurable #810

Closed pbrehm closed 4 months ago

pbrehm commented 4 months ago

Contributing guidelines

Module(s)

mini.indentscope

Description

I noticed that we got a new feature in a recent commit on mini.indentscope. 93a515fe0f38165a0d3c0f8fcae459294608851f

"feat(indentscope): show indent guide on wrapped lines"

I personally would prefer that this behavior be configurable as I would like to disable it in my config.

I have already modified a copy of this module to incorporate this as an opt passed to setup.

I propose that we add it inside config.draw

   -- If using neovim > 0.10 and this property = true
   -- then display indentscope line on wrapped lines
    indent_guide_on_wrapped_lines = true

I think that we should make this default to yes to be consistent with the current behavior.

I can make a pr with my changes if this is something that ya'll would consider

echasnovski commented 4 months ago

Thanks for the suggestion!

After some testing, I've noticed that it overlaps wrapped lines if 'breakindent' option is disabled. This should now be fixed on latest main to a reasonable extent.

If it was not the main issue you had with it, would you mind elaborating why you'd like to disable it?

pbrehm commented 4 months ago

Thanks for looking into this!

Its true; I had breakindent set to false and thus had the "indent line" overlapping characters on the wrapped line.

With this change I am no longer seeing this behavior.

Also thanks for bringing the breakindent option to my attention as that is a nice feature in combination with mini.indentscope.

We can close this issue as the behavior I was unhappy with has been fixed.