Last active
April 11, 2019 21:51
-
-
Save jrolfs/2be35593f117e3b19647009c7de7408c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! GetColorFromHighlightGroup(group, color, env) | |
return synIDattr(synIDtrans(hlID(a:group)), a:color, a:env) | |
endfunction | |
function! GetBackgroundColors(group) | |
return | |
\ ' ctermbg=' . GetColorFromHighlightGroup(a:group, 'bg', 'cterm') . | |
\ ' guibg=' . GetColorFromHighlightGroup(a:group, 'bg', 'gui') | |
endfunction | |
function! GetFrontgroundColors(group) | |
return | |
\ ' ctermfg=' . GetColorFromHighlightGroup(a:group, 'fg', 'cterm') . | |
\ ' guifg=' . GetColorFromHighlightGroup(a:group, 'fg', 'gui') | |
endfunction | |
function! NeoMakeDefaults() | |
let l:sign_bg = GetBackgroundColors('SignColumn') | |
let l:error_sign_fg = GetFrontgroundColors('ErrorMsg') | |
let l:warning_sign_fg = GetFrontgroundColors('Todo') | |
let l:information_sign_fg = GetFrontgroundColors('Question') | |
let l:default_sign_fg = GetFrontgroundColors('ModeMsg') | |
execute 'highlight NeomakeErrorDefault' . l:error_sign_fg . l:sign_bg | |
execute 'highlight NeomakeWarningDefault' . l:warning_sign_fg . l:sign_bg | |
execute 'highlight NeomakeInformationalDefault' . l:information_sign_fg . l:sign_bg | |
execute 'highlight NeomakeMessageDefault' . l:default_sign_fg . l:sign_bg | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello I used your function to set the warning and error sign but, I am not getting "?" , what font are you using