echasnovski / mini.nvim

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

Indentscope doesn't work properly in nvimtree #607

Closed diegoulloao closed 9 months ago

diegoulloao commented 9 months ago

Contributing guidelines

Module(s)

mini.indentscope

Description

mini.indentscope doesn't work properly in nvimtree, it works at only 1 level.

Capture

https://github.com/echasnovski/mini.nvim/assets/45423661/474bd9ef-c970-481e-baa9-11b57f488d85

Neovim version

0.9.4

Steps to reproduce

Basic config is enough to reproduce.

Expected behavior

See indent working on different folders level.

Actual behavior

It works only at 1 level.

echasnovski commented 9 months ago

Thanks for the issue!

Basic config is enough to reproduce.

Unfortunately, this is not the case. It does work with basic 'nvim-tree' config, i.e. require('nvim-tree').setup(). In the video demo it has at least require('nvim-tree').setup({ renderer = { indent_markers = { enable = true } } }). With those enabled, there are indent markers placed as literal text in the lines, thus making 'mini.indentscope' treat them as a reference when computing indent level.

Disabling indent markers in 'nvim-tree' is the only way to make 'mini.indentscope' work here.