Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation change icon into ">>" #851

Closed
rhesadaiva opened this issue Mar 24, 2024 · 5 comments
Closed

Indentation change icon into ">>" #851

rhesadaiva opened this issue Mar 24, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@rhesadaiva
Copy link

rhesadaiva commented Mar 24, 2024

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 rhesadaiva added the bug Something isn't working label Mar 24, 2024
@lukas-reineke
Copy link
Owner

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
Copy link

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
Copy link
Owner

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
Copy link

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants