Skip to content

Commit

Permalink
[nvim] fix the colorscheme on nvim older than 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitmel committed Oct 22, 2021
1 parent 565febf commit 488ec36
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nvim/colors/dotfiles.vim
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@

" The idea of using the `nocombine` attribute was taken from
" <https://github.com/lukas-reineke/indent-blankline.nvim/blob/0a98fa8dacafe22df0c44658f9de3968dc284d20/lua/indent_blankline/utils.lua#L221>.
call s:hi('NonText', 0x3, '', 'nocombine', '')
call s:hi('IndentLine', 0x2, '', 'nocombine', '')
let s:nocombine_attr = has('patch-8.0.0914') || has('nvim-0.5.0') ? 'nocombine' : ''
call s:hi('NonText', 0x3, '', s:nocombine_attr, '')
call s:hi('IndentLine', 0x2, '', s:nocombine_attr, '')
hi! link IndentBlanklineChar IndentLine
hi! link IndentBlanklineSpaceChar Whitespace
hi! link IndentBlanklineSpaceCharBlankline Whitespace
Expand All @@ -104,8 +105,8 @@
call s:hi_raw('IndentLineRainbow' . s:color, {
\ 'ctermfg': s:colors[0x2].cterm,
\ 'guifg': s:color_to_css_hex(s:mix_colors(s:colors[0x0], s:colors[8 + s:color], g:dotfiles_rainbow_indent_opacity)),
\ 'cterm': 'nocombine',
\ 'gui': 'nocombine',
\ 'cterm': s:nocombine_attr,
\ 'gui': s:nocombine_attr,
\ })
endfor | unlet s:color
endif
Expand Down

0 comments on commit 488ec36

Please sign in to comment.