indent-blankline.nvim icon indicating copy to clipboard operation
indent-blankline.nvim copied to clipboard

Indentation change icon into ">>"

Open rhesadaiva opened this issue 1 year ago • 1 comments

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

rhesadaiva avatar Mar 24 '24 17:03 rhesadaiva

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.

lukas-reineke avatar Mar 25 '24 02:03 lukas-reineke

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

jhoffmann avatar May 06 '24 11:05 jhoffmann

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

lukas-reineke avatar May 06 '24 13:05 lukas-reineke

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.

jhoffmann avatar May 06 '24 13:05 jhoffmann

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.

lukas-reineke avatar May 07 '24 01:05 lukas-reineke