Skip to content

Commit

Permalink
Use GUIColors in Windows WSL
Browse files Browse the repository at this point in the history
  • Loading branch information
Matsuuu committed Sep 26, 2024
1 parent 5121864 commit 7a2407c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion colors/pinkmare.vim
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,17 @@ let s:palette = pinkmare#get_palette()
" E.g.:
" call s:HL('Normal', s:palette.fg, s:palette.bg0)

if (has('termguicolors') && &termguicolors) || has('gui_running') " guifg guibg gui cterm guisp
function! IsWSL()
let uname = substitute(system('uname'),'\n','','')
if uname == 'Linux'
let lines = readfile("/proc/version")
if lines[0] =~ "Microsoft"
return 1
endif
endif
endfunction

if (has('termguicolors') && &termguicolors) || has('gui_running' || IsWSL()) " guifg guibg gui cterm guisp
function! s:HL(group, fg, bg, ...)
let l:fg = get(get(s:configuration.overwrite_groups, a:group, {}), 'fg', a:fg)
let l:bg = get(get(s:configuration.overwrite_groups, a:group, {}), 'bg', a:bg)
Expand Down

0 comments on commit 7a2407c

Please sign in to comment.