Skip to content
This repository was archived by the owner on Jul 29, 2023. It is now read-only.
This repository was archived by the owner on Jul 29, 2023. It is now read-only.

BUG: Does not work with a transparent background color but I think I figured out why #370

@leftbones

Description

@leftbones

After installing I wasn't able to get the lines to show up by setting

let g:indentLine_defaultGroup = 'Comment'
let g:indentLine_char = '|'

in my .vimrc

I'm on a Mac, but I verified with grep that my installation of vim (brew) has conceal, and running hi conceal outputs Conceal xxx ctermfg=59 guifg=#5C6370

I use a custom color scheme, so I decided to try onedark since it's well supported, and suddenly the lines appeared again. Then, after applying the code to make the background color transparent for onedark, the lines disappeared again.

This is the code supplied on the onedark repo, added before colorscheme in my .vimrc

" onedark.vim override: Don't set a background color when running in a terminal;
" just use the terminal's background color
" `gui` is the hex color code used in GUI mode/nvim true-color mode
" `cterm` is the color code used in 256-color mode
" `cterm16` is the color code used in 16-color mode
if (has("autocmd") && !has("gui_running"))
  augroup colorset
    autocmd!
    let s:white = { "gui": "#ABB2BF", "cterm": "145", "cterm16" : "7" }
    autocmd ColorScheme * call onedark#set_highlight("Normal", { "fg": s:white }) " `bg` will not be styled since there is no `bg` setting
  augroup END
endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions