diff --git a/README.md b/README.md index db992b82..ebc56526 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Features * Lots of style-customization options (contrast, color invertion, italics usage etc.) * Extended filetype highlighting: Html, Xml, Vim (and ES6 with [yajs.vim](https://github.com/othree/yajs.vim)), Clojure, C, Python, JavaScript, CoffeeScript, Ruby, Objective-C, Go, Lua, MoonScript, Java, Markdown, Haskell -* Supported plugins: [EasyMotion][], [vim-sneak][], [Indent Guides][], [indentLine][], [Rainbow Parentheses][], [Airline][], [GitGutter][], [Signify][], [ShowMarks][], [Signature][], [Syntastic][], [CtrlP][], [Startify][] +* Supported plugins: [EasyMotion][], [vim-sneak][], [Indent Guides][], [indentLine][], [Rainbow Parentheses][], [Airline][], [Lightline][], [GitGutter][], [Signify][], [ShowMarks][], [Signature][], [Syntastic][], [CtrlP][], [Startify][] [EasyMotion]: https://github.com/Lokaltog/vim-easymotion [vim-sneak]: https://github.com/justinmk/vim-sneak @@ -74,6 +74,7 @@ Features [indentLine]: https://github.com/Yggdroot/indentLine [Rainbow Parentheses]: https://github.com/kien/rainbow_parentheses.vim [Airline]: https://github.com/bling/vim-airline + [Lightline]: https://github.com/itchyny/lightline.vim [GitGutter]: https://github.com/airblade/vim-gitgutter [Signify]: https://github.com/mhinz/vim-signify [ShowMarks]: http://www.vim.org/scripts/script.php?script_id=152 @@ -94,7 +95,6 @@ ToDo * Filetype syntax highlighting (R, TeX, Swift, Erlang and I'm still dissatisfied with CSS) * Plugin support (MiniBufExplorer, Tagbar, Netrw, VimPLug) -* Lightline theme Self-Promotion -------------- diff --git a/autoload/lightline/colorscheme/gruvbox.vim b/autoload/lightline/colorscheme/gruvbox.vim new file mode 100644 index 00000000..154e9150 --- /dev/null +++ b/autoload/lightline/colorscheme/gruvbox.vim @@ -0,0 +1,57 @@ +" ----------------------------------------------------------------------------- +" File: gruvbox.vim +" Description: Gruvbox colorscheme for Lightline (itchyny/lightline.vim) +" Author: gmoe +" Source: https://github.com/morhetz/gruvbox +" Last Modified: 31 Oct 2015 +" ----------------------------------------------------------------------------- + +function! s:getGruvColor(group) + let guiColor = synIDattr(hlID(a:group), "fg", "gui") + let termColor = synIDattr(hlID(a:group), "fg", "cterm") + return [ guiColor, termColor ] +endfunction + +if exists('g:lightline') + + let s:bg1 = s:getGruvColor('GruvboxBg1') + let s:bg2 = s:getGruvColor('GruvboxBg2') + let s:bg3 = s:getGruvColor('GruvboxBg3') + let s:bg4 = s:getGruvColor('GruvboxBg4') + let s:gray = s:getGruvColor('GruvboxGray') + let s:fg1 = s:getGruvColor('GruvboxFg1') + let s:fg2 = s:getGruvColor('GruvboxFg2') + let s:fg3 = s:getGruvColor('GruvboxFg3') + let s:fg4 = s:getGruvColor('GruvboxFg4') + + let s:red = s:getGruvColor('GruvboxRed') + let s:green = s:getGruvColor('GruvboxGreen') + let s:yellow = s:getGruvColor('GruvboxYellow') + let s:blue = s:getGruvColor('GruvboxBlue') + let s:purple = s:getGruvColor('GruvboxPurple') + let s:aqua = s:getGruvColor('GruvboxAqua') + let s:orange = s:getGruvColor('GruvboxOrange') + + let s:p = {'normal':{}, 'inactive':{}, 'insert':{}, 'replace':{}, 'visual':{}, 'tabline':{}} + let s:p.normal.left = [ [ s:bg1, s:fg4 ], [ s:fg4, s:bg2 ] ] + let s:p.normal.right = [ [ s:bg1, s:fg4 ], [ s:fg4, s:bg2 ] ] + let s:p.inactive.right = [ [ s:gray, s:bg1 ], [ s:gray, s:bg1 ] ] + let s:p.inactive.left = [ [ s:gray, s:bg1 ], [ s:gray, s:bg1 ] ] + let s:p.insert.left = [ [ s:bg2, s:blue ], [ s:fg4, s:bg2 ] ] + let s:p.insert.right = [ [ s:bg2, s:blue ], [ s:fg4, s:bg2 ] ] + let s:p.replace.left = [ [ s:bg2, s:aqua ], [ s:fg4, s:bg2 ] ] + let s:p.replace.right = [ [ s:bg2, s:aqua ], [ s:fg4, s:bg2 ] ] + let s:p.visual.left = [ [ s:bg2, s:orange ], [ s:fg4, s:bg2 ] ] + let s:p.visual.right = [ [ s:bg2, s:orange ], [ s:fg4, s:bg2 ] ] + let s:p.normal.middle = [ [ s:fg3, s:bg1 ] ] + let s:p.inactive.middle = [ [ s:fg3, s:bg1 ] ] + let s:p.tabline.left = [ [ s:bg1, s:fg4 ] ] + let s:p.tabline.tabsel = [ [ s:fg4, s:bg2 ] ] + let s:p.tabline.middle = [ [ s:bg4, s:bg1 ] ] + let s:p.tabline.right = [ [ s:bg1, s:orange ] ] + let s:p.normal.error = [ [ s:bg1, s:red ] ] + let s:p.normal.warning = [ [ s:bg2, s:yellow ] ] + + let g:lightline#colorscheme#gruvbox#palette = lightline#colorscheme#flatten(s:p) +endif + diff --git a/colors/gruvbox.vim b/colors/gruvbox.vim index d4f5b8b4..cbb45fc9 100644 --- a/colors/gruvbox.vim +++ b/colors/gruvbox.vim @@ -394,7 +394,10 @@ call s:HL('GruvboxFg1', s:fg1) call s:HL('GruvboxFg3', s:fg3) call s:HL('GruvboxFg4', s:fg4) call s:HL('GruvboxGray', s:gray) +call s:HL('GruvboxBg1', s:bg1) call s:HL('GruvboxBg2', s:bg2) +call s:HL('GruvboxBg3', s:bg3) +call s:HL('GruvboxBg4', s:bg4) call s:HL('GruvboxRed', s:red) call s:HL('GruvboxRedBold', s:red, s:none, s:bold)