From be8c754eb1cc947521831d0d2e2fb9da5420d57a Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 12 Apr 2016 01:40:12 +0900 Subject: [PATCH] Support truecolor Neovim --- autoload/limelight.vim | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/autoload/limelight.vim b/autoload/limelight.vim index d59968c..918a32d 100644 --- a/autoload/limelight.vim +++ b/autoload/limelight.vim @@ -32,11 +32,6 @@ set cpo&vim let s:default_coeff = str2float('0.5') let s:invalid_coefficient = 'Invalid coefficient. Expected: 0.0 ~ 1.0' -function! s:nvim_unsupported() - let var = 'g:limelight_conceal_guifg' - return 'Neovim with true colors is not yet supported. Please set '.var -endfunction - function! s:unsupported() let var = 'g:limelight_conceal_'.(has('gui_running') ? 'gui' : 'cterm').'fg' @@ -144,13 +139,11 @@ function! s:dim(coeff) let fg = synIDattr(synid, 'fg#') let bg = synIDattr(synid, 'bg#') - if has('gui_running') + if has('gui_running') || has('nvim') && $NVIM_TUI_ENABLE_TRUE_COLOR if a:coeff < 0 && exists('g:limelight_conceal_guifg') let dim = g:limelight_conceal_guifg elseif empty(fg) || empty(bg) throw s:unsupported() - elseif has('nvim') - throw s:nvim_unsupported() else let coeff = s:coeff(a:coeff) let fg_rgb = s:hex2rgb(fg)