lukas-reineke / indent-blankline.nvim

Indent guides for Neovim
MIT License
3.98k stars 99 forks source link

Indentation change icon into ">>" #851

Closed rhesadaiva closed 2 months ago

rhesadaiva commented 3 months ago

Problem

Hello, i have an old PHP project which i need to maintain, when i open the file for the first time, it shows the default indentline "|"

Screenshot 2024-03-25 at 00 14 02

When i do some editing and save, the indentation change into ">>"

Screenshot 2024-03-25 at 00 14 10

Steps to reproduce

Screenshot 2024-03-25 at 00 20 44

And for the colors, i create a custom color palette which code like this

Screenshot 2024-03-25 at 00 20 24

Expected behavior

It should return a normal indentline instead of ">>"

Neovim version (nvim -v)

0.9.5

lukas-reineke commented 3 months ago

The file probably gets formatted when you save, and the indentation changes from spaces to tabs. Take a look at :help ibl.config.indent.tab_char to configure how tabs get displayed.

jhoffmann commented 2 months ago

This is happening to me on file open, not save, so it's not a format issue. But it only seems to happen for some languages. LUA seems fine, Go does not for example.

image

lukas-reineke commented 2 months ago

It doesn't happen after formatting for you because your file is already indented with tabs.

This is the correct behavior, please read :help ibl.config.indent.tab_char

jhoffmann commented 2 months ago

So what you're saying is the intended behavior is to only show solid lines for space indented files? I've read the 2 help lines mentioned, it doesn't help explain the intended behaviour.

lukas-reineke commented 2 months ago

How spaces are displayed is configured with ibl.config.indent.char. How tabs are displayed is configured with ibl.config.indent.tab_char.

If you do not set ibl.config.indent.tab_char in your config, it defaults to :help lcs-tab if :help 'list' is set, otherwise it uses ibl.config.indent.char.
You have 'list' set, and tab in listchars set to >>. So that is what ibl is using.

This is explained in the help file.