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

some thoughts/unexpected behavior #42

Closed
rudotriton opened this issue Feb 22, 2021 · 7 comments
Closed

some thoughts/unexpected behavior #42

rudotriton opened this issue Feb 22, 2021 · 7 comments

Comments

@rudotriton
Copy link

I saw the reddit post and I've been playing around with it for a while now and I'm close to really liking it. I imagined I could replicate something that I had with indent rainbow in vscode:

Screenshot 2021-02-22

And I think the closest I can get is something like this?:

Screenshot 2021-02-22


Screenshot 2021-02-22

  • I don't think I can turn off the as on just the even/empty lines, because having them seems to be the selling point of this plugin. I don't mind them too much inside functions, but anywhere else, like line 15, it looks as if I have trailing whitespace there or a connection to something above even though it's a single function.
  • there always seems to be a 3 wide void before the let. I realized that setting a space in listchars fills it, but it also marks every other space.
  • the first color group is 5 wide instead of 4?

Something else I noticed is that indent_blankline_space_char_blankline_highlight_list doesn't seem to have any effect. indent_blankline_space_char_blankline_highlight does work though.

I'm not sure how much customization you want to offer with this plugin, judging by the number of options available it looks like a good amount.

Other than that, I think you have a really nice plugin here

@rudotriton rudotriton changed the title some thougths/unexpected behavior some thoughts/unexpected behavior Feb 22, 2021
@lukas-reineke
Copy link
Owner

Very good points

I didn't think about highlighting and the empty last block and big first block.
It makes much more sense to create the indent [char, whitespace] now instead of [whitespace, char] like it was before.
I think I can fix all of your issues.

@lukas-reineke
Copy link
Owner

indent_blankline_show_first_indent_levelindent_blankline_show_first_indent_level

this should be fixed now.

I don't think I can turn off the as on just the even/empty lines

I removed indentation on empty lines that are not part of deeper indentation.
I also added g:indent_blankline_show_first_indent_level to turn of indent guides on the first column in all cases

there always seems to be a 3 wide void before the let
this should be fixed now

the first color group is 5 wide instead of 4?
this should be fixed as well

As a bonus, I added g:indent_blankline_show_trailing_blankline_indent
You can turn that off if you just want to use background highlights, they should all line up now

Thanks for the issue 🚀 let me know if anything else is not working

@rudotriton
Copy link
Author

Amazing, I really like the changes and I can get it working exactly how I would like.

Some things I see, neither of which affect me, and ignore if something is intentional, but:

  • if g:indent_blankline_space_char_highlight_list is set then its variation: g:indent_blankline_space_char_blankline_highlight_list, or non-list, won't overrule it and the colors set to be used on indent lines are also used for empty line. It's good for not having to set multiple variables, but by setting them, maybe you'd expect them to be considered.
  • trailing colors are not in sync:

Screenshot 2021-02-23

@lukas-reineke
Copy link
Owner

hm I can't reproduce the g:indent_blankline_space_char_highlight_list issue, if I set this.

let g:indent_blankline_space_char_highlight_list = ['DiffDelete', 'markdownFirstHeadline']
let g:indent_blankline_space_char_blankline_highlight_list = []

I get no highlight for the blank lines like I would expect.

For the out of sync bug, thank you. I pushed a fix now

@rudotriton
Copy link
Author

The first one may have been my misunderstanding with something, I can't repro it either now.

The trailing indents are in sync now which is really sweet, however with let g:indent_blankline_show_first_indent_level = v:false, they lose their styling completely. Likely not intentional, maybe indexing something that is not in the list? Doesn't seem to depend on the list length though.

Screen Shot 2021-02-25

Screen Shot 2021-02-25

@lukas-reineke
Copy link
Owner

lukas-reineke commented Feb 25, 2021

Good catch. When calculating the index I forgot that the first pair could be only whitespace.
So the index became a float.
Pushed a fix, thank you.

@rudotriton
Copy link
Author

Amazing! I believe these issues are done now 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants