mini.nvim icon indicating copy to clipboard operation
mini.nvim copied to clipboard

IndentScope show all indents always

Open yodigi7 opened this issue 1 year ago • 1 comments

Contributing guidelines

Module(s)

mini.indentscope

Description

I would like to have the indentation lines always shown for all indent levels similar to the defaults at https://github.com/lukas-reineke/indent-blankline.nvim rather than just the current inner scope at cursor.

yodigi7 avatar Jul 29 '22 02:07 yodigi7

It is intentionally by design. 'indent-blankline.nvim' is already a great plugin for the purpose of displaying all indent guides. And besides that, it might be difficult to implement it efficiently under current design (as it should support animation). I'll think about it.

Is this similar to #65 or differs in some ways?

echasnovski avatar Jul 29 '22 06:07 echasnovski

Suggestion for compromise: Offer opt-in option for different colors based on current indent level + type (space or tab). For languages like python (or proper set up formatters), this is sufficient and other code bases only require adjustments to the current indent level + type. However I dont know, if reading current indent level + type is needed and how the current logic works.

Alternatively, it would be nice to have a plugin suggestion for this use cases, which utilizes asynchronous drawing. ~~The other existing ones are blocking.~~

matu3ba avatar Nov 12 '22 19:11 matu3ba

Suggestion for compromise: Offer opt-in option for different colors based on current indent level + type (space or tab). For languages like python (or proper set up formatters), this is sufficient and other code bases only require adjustments to the current indent level + type. However I dont know, if reading current indent level + type is needed and how the current logic works.

This is interesting... I have been for some time on the verge of almost closing this with 'wontfix', to be honest. I'll think about possibility of different coloring.

Alternatively, it would be nice to have a plugin suggestion for this use cases, which utilizes asynchronous drawing. The other existing ones are blocking.

Are you sure 'lukas-reineke/indent-blankline.nvim' is blocking? It has quite a few async and schedule_wrap in its code, so I would assume it is non-blocking.

echasnovski avatar Nov 13 '22 08:11 echasnovski

Having the option for runtime-configuration would be also helpful until treesitter indent works properly to ensure a documented has proper formatting (languages without formatter implementation etc). This would include toggle on/off and expect space/tab with marking the other in a fat red marking, since indentscope overwrites the charlist symbols before prefix (to draw the line).

Alternatively, it would be nice to mention a workaround to draw stuff that works (I guess writing with higher priority than the gitsigns markers) could work.

matu3ba avatar Jan 02 '23 08:01 matu3ba

Sorry, but I have a hard time comprehending this in full.

This would include toggle on/off and expect space/tab with marking the other in a fat red marking, since indentscope overwrites the charlist symbols before prefix (to draw the line).

I am not quite sure what you mean here. Is it about your coloring suggestion? And what does "marking the other in a fat red marking" mean?

Alternatively, it would be nice to mention a workaround to draw stuff that works (I guess writing with higher priority than the gitsigns markers) could work.

Which stuff should work and how 'gitsigns.nvim' is involved here? If you meant 'indentblankline.nvim', then current drawing of 'mini.indentscope' should already work quite nicely with it by drawing line on top.

echasnovski avatar Jan 02 '23 09:01 echasnovski

After a long time of having this opened, I think I am going to close this. This feels like out of scope for 'mini.indentscope'. It now works correctly with 'lukas-reineke/indent-blankline.nvim' (doesn't cover its lines), so probably best to use them both.

I plan to implement #226 as compromise.

echasnovski avatar Feb 13 '23 10:02 echasnovski