Yggdroot / indentLine

A vim plugin to display the indention levels with thin vertical lines
MIT License
4.14k stars 231 forks source link

g:indentLine_defaultGroup doesn't seem to take effect #339

Closed zuqini closed 3 years ago

zuqini commented 3 years ago

Terminal: Iterm2 Build 3.4.3

From init.vim:

let g:indentLine_defaultGroup = 'Constant'

From theme.vim:

call s:HL('Constant', s:palette.orange, s:palette.none) " s.palette.orange is #FF9E64

Observed: Even though the highlight group is set to 'Constant' which is working elsewhere in the code, the indentline colors remain unchanged. image Expected: image

From reading the docs, I believe everything is configured properly. Please let me know if I'm missing anything. Thank you.

Yggdroot commented 3 years ago

I think call s:HL('Constant', s:palette.orange, s:palette.none) " s.palette.orange is #FF9E64 is executed after indentLine knows the color of Constant.

Use a normal colorscheme, It should work as expected.

zuqini commented 3 years ago

I see. Using one of Vim's built in color scheme like the following works:

colorscheme blue
let g:indentLine_defaultGroup = 'Constant'

I suppose this means that this setting will not work with custom themes from /colors/. I'm wondering if it makes sense to use the autocmd to support setting the indentLine color after all the themes are loaded in the future (or if there's other solutions to support this case).

If not, feel free to close this issue

Yggdroot commented 3 years ago

I suppose this means that this setting will not work with custom themes from /colors/.

No, it will work for all colorschemes from /colors/. This issue is caused by how your colorscheme is implemented.

zuqini commented 3 years ago

Got it. Thanks, will close this issue here.