2019-04-21 11:42:15 +00:00
|
|
|
" modified version of base16-vim (https://github.com/chriskempson/base16-vim)
|
|
|
|
" by Chris Kempson (http://chriskempson.com)
|
|
|
|
|
|
|
|
" Color definitions {{{
|
|
|
|
|
2019-08-25 08:34:11 +00:00
|
|
|
execute 'source' fnameescape(g:nvim_dotfiles_dir.'/../colorschemes/out/nvim.vim')
|
|
|
|
|
2019-09-19 17:10:59 +00:00
|
|
|
if !&termguicolors && exists('$_COLORSCHEME_TERMINAL')
|
|
|
|
set notermguicolors
|
2019-05-05 22:51:47 +00:00
|
|
|
endif
|
|
|
|
|
2019-04-21 11:42:15 +00:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Theme setup {{{
|
|
|
|
hi clear
|
|
|
|
syntax reset
|
2019-09-05 21:37:09 +00:00
|
|
|
let g:colors_name = g:dotfiles_colorscheme_name
|
2019-04-21 11:42:15 +00:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Highlighting function {{{
|
|
|
|
function s:is_number(value)
|
|
|
|
return type(a:value) == v:t_number
|
|
|
|
endfunction
|
|
|
|
|
2019-09-05 21:37:09 +00:00
|
|
|
let s:colors = g:dotfiles_colorscheme_base16_colors
|
2019-04-21 11:42:15 +00:00
|
|
|
function s:hi(group, fg, bg, attr, guisp)
|
|
|
|
let l:args = ''
|
|
|
|
if a:fg isnot ''
|
|
|
|
let l:fg = s:is_number(a:fg) ? s:colors[a:fg] : {'gui': a:fg, 'cterm': a:fg}
|
|
|
|
let l:args .= ' guifg=' . l:fg.gui . ' ctermfg=' . l:fg.cterm
|
|
|
|
endif
|
|
|
|
if a:bg isnot ''
|
|
|
|
let l:bg = s:is_number(a:bg) ? s:colors[a:bg] : {'gui': a:bg, 'cterm': a:bg}
|
|
|
|
let l:args .= ' guibg=' . l:bg.gui . ' ctermbg=' . l:bg.cterm
|
|
|
|
endif
|
|
|
|
if a:attr isnot ''
|
|
|
|
let l:args .= ' gui=' . a:attr . ' cterm=' . a:attr
|
|
|
|
endif
|
|
|
|
if a:guisp isnot ''
|
|
|
|
let l:guisp = s:is_number(a:guisp) ? s:colors[a:guisp].gui : a:guisp
|
|
|
|
let l:args .= ' guisp=' . l:guisp
|
|
|
|
endif
|
|
|
|
exec 'hi' a:group l:args
|
|
|
|
endfunction
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" General syntax highlighting {{{
|
|
|
|
|
|
|
|
call s:hi('Normal', 0x5, 0x0, '', '')
|
|
|
|
call s:hi('Italic', 0xE, '', 'italic', '')
|
|
|
|
call s:hi('Bold', 0xA, '', 'bold', '')
|
|
|
|
call s:hi('Underlined', 0x8, '', 'underline', '')
|
|
|
|
call s:hi('Title', 0xD, '', '', '')
|
|
|
|
hi! link Directory Title
|
|
|
|
call s:hi('Conceal', 0xC, 'NONE', '', '')
|
|
|
|
call s:hi('NonText', 0x3, '', '', '')
|
|
|
|
hi! link SpecialKey NonText
|
|
|
|
call s:hi('MatchParen', 'fg', 0x3, '', '')
|
|
|
|
|
|
|
|
call s:hi('Keyword', 0xE, '', '', '')
|
|
|
|
hi! link Statement Keyword
|
|
|
|
hi! link Repeat Keyword
|
|
|
|
hi! link StorageClass Keyword
|
|
|
|
hi! link Exception Keyword
|
|
|
|
hi! link Structure Keyword
|
|
|
|
hi! link Conditional Keyword
|
|
|
|
call s:hi('Constant', 0x9, '', '', '')
|
2019-11-19 19:20:46 +00:00
|
|
|
hi! link Boolean Constant
|
|
|
|
hi! link Float Constant
|
|
|
|
hi! link Number Constant
|
2019-04-21 11:42:15 +00:00
|
|
|
call s:hi('String', 0xB, '', '', '')
|
2020-08-08 08:00:43 +00:00
|
|
|
hi! link Character String
|
|
|
|
hi! link Quote String
|
|
|
|
hi! link StringDelimiter String
|
2019-04-21 11:42:15 +00:00
|
|
|
call s:hi('Comment', 0x3, '', '', '')
|
|
|
|
hi! link SpecialComment Comment
|
|
|
|
call s:hi('Todo', 'bg', 0xA, 'bold', '')
|
|
|
|
call s:hi('Function', 0xD, '', '', '')
|
2019-05-05 22:51:47 +00:00
|
|
|
call s:hi('Identifier', 0x8, '', 'none', '')
|
2019-04-21 11:42:15 +00:00
|
|
|
hi! link Variable Identifier
|
2020-08-01 16:52:11 +00:00
|
|
|
" call s:hi('Include', 0xF, '', '', '')
|
|
|
|
hi! link Include Keyword
|
2019-04-21 11:42:15 +00:00
|
|
|
call s:hi('PreProc', 0xA, '', '', '')
|
|
|
|
call s:hi('Label', 0xA, '', '', '')
|
|
|
|
hi! link Operator NONE
|
|
|
|
hi! link Delimiter NONE
|
|
|
|
call s:hi('Special', 0xC, '', '', '')
|
|
|
|
call s:hi('Tag', 0xA, '', '', '')
|
|
|
|
call s:hi('Type', 0xA, '', 'none', '')
|
|
|
|
hi! link Typedef Type
|
|
|
|
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" User interface {{{
|
|
|
|
|
2019-05-01 14:32:44 +00:00
|
|
|
call s:hi('Error', 'bg', 0x8, '', '')
|
|
|
|
call s:hi('ErrorMsg', 0x8, 'NONE', '', '')
|
|
|
|
call s:hi('WarningMsg', 0x9, 'NONE', '', '')
|
|
|
|
call s:hi('TooLong', 0x8, '', '', '')
|
|
|
|
call s:hi('Debug', 0x8, '', '', '')
|
|
|
|
hi! link CocErrorSign Error
|
|
|
|
call s:hi('CocWarningSign', 'bg', 0xA, '', '')
|
|
|
|
call s:hi('CocInfoSign', 'bg', 0xD, '', '')
|
|
|
|
hi! link CocHintSign CocInfoSign
|
2019-04-21 11:42:15 +00:00
|
|
|
|
|
|
|
call s:hi('FoldColumn', 0xC, 0x1, '', '')
|
|
|
|
call s:hi('Folded', 0x3, 0x1, '', '')
|
|
|
|
|
|
|
|
call s:hi('IncSearch', 0x1, 0x9, 'none', '')
|
|
|
|
call s:hi('Search', 0x1, 0xA, '', '')
|
|
|
|
hi! link Substitute Search
|
|
|
|
|
|
|
|
call s:hi('ModeMsg', 0xB, '', '', '')
|
|
|
|
call s:hi('Question', 0xB, '', '', '')
|
|
|
|
hi! link MoreMsg Question
|
|
|
|
call s:hi('Visual', '', 0x2, '', '')
|
|
|
|
call s:hi('WildMenu', 0x1, 'fg', '', '')
|
|
|
|
|
2019-05-05 22:51:47 +00:00
|
|
|
call s:hi('CursorLine', '', 0x1, 'none', '')
|
2019-04-21 11:42:15 +00:00
|
|
|
hi! link CursorColumn CursorLine
|
|
|
|
call s:hi('ColorColumn', '', 0x1, '', '')
|
|
|
|
call s:hi('LineNr', 0x3, 0x1, '', '')
|
|
|
|
call s:hi('CursorLineNr', 0x4, 0x1, '', '')
|
|
|
|
call s:hi('QuickFixLine', '', 0x2, '', '')
|
|
|
|
|
|
|
|
call s:hi('SignColumn', 0x3, 0x1, '', '')
|
|
|
|
call s:hi('StatusLine', 0x4, 0x1, 'none', '')
|
|
|
|
call s:hi('StatusLineNC', 0x3, 0x1, '', '')
|
|
|
|
call s:hi('VertSplit', 0x2, 0x2, '', '')
|
|
|
|
call s:hi('TabLine', 0x3, 0x1, '', '')
|
|
|
|
call s:hi('TabLineFill', 0x3, 0x1, '', '')
|
|
|
|
call s:hi('TabLineSel', 0xB, 0x1, '', '')
|
|
|
|
|
|
|
|
call s:hi('PMenu', 'fg', 0x1, '', '')
|
|
|
|
call s:hi('PMenuSel', 0x1, 'fg', '', '')
|
|
|
|
|
|
|
|
" }}}
|
|
|
|
|
2020-02-10 12:36:49 +00:00
|
|
|
" CtrlSF {{{
|
|
|
|
hi! link ctrlsfMatch Search
|
|
|
|
hi! link ctrlsfLnumMatch ctrlsfMatch
|
|
|
|
" }}}
|
|
|
|
|
2019-08-25 23:02:27 +00:00
|
|
|
" AWK {{{
|
|
|
|
hi! link awkArrayElement Number
|
|
|
|
hi! link awkBoolLogic Operator
|
|
|
|
hi! link awkComma Delimiter
|
|
|
|
hi! link awkExpression Operator
|
|
|
|
hi! link awkFieldVars awkVariables
|
|
|
|
hi! link awkOperator Operator
|
|
|
|
hi! link awkPatterns Label
|
|
|
|
hi! link awkSemicolon Delimiter
|
|
|
|
hi! link awkVariables Variable
|
|
|
|
" }}}
|
|
|
|
|
2019-04-21 11:42:15 +00:00
|
|
|
" Diff {{{
|
|
|
|
" diff mode
|
|
|
|
call s:hi('DiffAdd', 0xB, 0x1, '', '')
|
|
|
|
call s:hi('DiffDelete', 0x8, 0x1, '', '')
|
|
|
|
call s:hi('DiffText', 0xE, 0x1, '', '')
|
|
|
|
call s:hi('DiffChange', 0x3, 0x1, '', '')
|
|
|
|
" diff file
|
|
|
|
call s:hi('diffAdded', 0xB, '', '', '')
|
|
|
|
call s:hi('diffRemoved', 0x8, '', '', '')
|
|
|
|
call s:hi('diffChanged', 0xE, '', '', '')
|
|
|
|
hi! link diffNewFile diffAdded
|
|
|
|
hi! link diffFile diffRemoved
|
|
|
|
hi! link diffIndexLine Bold
|
|
|
|
hi! link diffLine Title
|
|
|
|
hi! link diffSubname Include
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" XML {{{
|
|
|
|
call s:hi('xmlTagName', 0x8, '', '', '')
|
|
|
|
call s:hi('xmlAttrib', 0x9, '', '', '')
|
2019-11-02 14:44:47 +00:00
|
|
|
hi! link xmlTag Delimiter
|
|
|
|
hi! link xmlEndTag Delimiter
|
|
|
|
hi! link xmlAttribPunct Delimiter
|
|
|
|
hi! link xmlProcessingDelim Delimiter
|
2019-04-21 11:42:15 +00:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Git {{{
|
|
|
|
hi! link gitCommitOverflow TooLong
|
|
|
|
hi! link gitCommitSummary String
|
|
|
|
hi! link gitCommitComment Comment
|
|
|
|
hi! link gitcommitUntracked Comment
|
|
|
|
hi! link gitcommitDiscarded Comment
|
|
|
|
hi! link gitcommitSelected Comment
|
|
|
|
hi! link gitcommitHeader Keyword
|
|
|
|
call s:hi('gitcommitSelectedType', 0xD, '', '', '')
|
|
|
|
call s:hi('gitcommitUnmergedType', 0xD, '', '', '')
|
|
|
|
call s:hi('gitcommitDiscardedType', 0xD, '', '', '')
|
|
|
|
hi! link gitcommitBranch Function
|
|
|
|
call s:hi('gitcommitUntrackedFile', 0xA, '', 'bold', '')
|
|
|
|
call s:hi('gitcommitUnmergedFile', 0x8, '', 'bold', '')
|
|
|
|
call s:hi('gitcommitDiscardedFile', 0x8, '', 'bold', '')
|
|
|
|
call s:hi('gitcommitSelectedFile', 0xB, '', 'bold', '')
|
|
|
|
|
|
|
|
hi! link GitGutterAdd DiffAdd
|
|
|
|
hi! link GitGutterDelete DiffDelete
|
|
|
|
hi! link GitGutterChange DiffText
|
|
|
|
hi! link GitGutterChangeDelete GitGutterDelete
|
|
|
|
hi! link SignifySignAdd DiffAdd
|
|
|
|
hi! link SignifySignChange DiffText
|
|
|
|
hi! link SignifySignDelete DiffDelete
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Vim scripts {{{
|
|
|
|
hi! link vimUserFunc vimFuncName
|
|
|
|
hi! link vimBracket vimMapModKey
|
|
|
|
hi! link vimFunction vimFuncName
|
|
|
|
hi! link vimParenSep Delimiter
|
|
|
|
hi! link vimSep Delimiter
|
|
|
|
hi! link vimVar Variable
|
|
|
|
hi! link vimFuncVar Variable
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" C {{{
|
|
|
|
hi! link cOperator Special
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" C# {{{
|
|
|
|
call s:hi('csClass', 0xA, '', '', '')
|
|
|
|
call s:hi('csAttribute', 0xA, '', '', '')
|
|
|
|
call s:hi('csModifier', 0xE, '', '', '')
|
|
|
|
hi! link csType Type
|
|
|
|
call s:hi('csUnspecifiedStatement', 0xD, '', '', '')
|
|
|
|
call s:hi('csContextualStatement', 0xE, '', '', '')
|
|
|
|
call s:hi('csNewDecleration', 0x8, '', '', '')
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Rust {{{
|
|
|
|
hi! link rustEnumVariant rustType
|
|
|
|
hi! link rustSelf Variable
|
|
|
|
hi! link rustSigil rustOperator
|
|
|
|
hi! link rustMacroVariable Variable
|
2020-08-12 14:49:01 +00:00
|
|
|
hi! link rustModPath Identifier
|
2019-04-21 11:42:15 +00:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" HTML {{{
|
|
|
|
hi! link htmlBold Bold
|
|
|
|
hi! link htmlItalic Italic
|
|
|
|
hi! link htmlTag xmlTag
|
|
|
|
hi! link htmlTagName xmlTagName
|
|
|
|
hi! link htmlSpecialTagName xmlTagName
|
|
|
|
hi! link htmlEndTag xmlEndTag
|
|
|
|
hi! link htmlArg xmlAttrib
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" CSS {{{
|
|
|
|
hi! link cssBraces Delimiter
|
|
|
|
hi! link cssTagName htmlTagName
|
|
|
|
hi! link cssPseudoClassId Special
|
|
|
|
hi! link cssClassName Type
|
|
|
|
hi! link cssClassNameDot cssClassName
|
|
|
|
hi! link cssAtRule Keyword
|
|
|
|
hi! link cssProp Identifier
|
|
|
|
hi! link cssVendor Special
|
|
|
|
hi! link cssNoise Delimiter
|
|
|
|
hi! link cssAttr String
|
|
|
|
hi! link cssAttrComma Delimiter
|
|
|
|
hi! link cssAttrRegion cssAttr
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" JavaScript {{{
|
|
|
|
hi! link javaScriptBraces Delimiter
|
2019-11-19 19:20:46 +00:00
|
|
|
hi! link jsParens Delimiter
|
2019-04-21 11:42:15 +00:00
|
|
|
hi! link jsOperator Operator
|
2019-11-19 19:20:46 +00:00
|
|
|
hi! link jsStorageClass StorageClass
|
2019-04-21 11:42:15 +00:00
|
|
|
hi! link jsThis Variable
|
|
|
|
hi! link jsSuper jsThis
|
|
|
|
hi! link jsClassDefinition Type
|
|
|
|
hi! link jsFunction Keyword
|
|
|
|
hi! link jsArrowFunction jsFunction
|
|
|
|
hi! link jsFuncName jsFuncCall
|
|
|
|
hi! link jsClassFuncName jsFuncCall
|
|
|
|
hi! link jsClassMethodType jsFunction
|
|
|
|
hi! link jsRegexpString Special
|
|
|
|
hi! link jsGlobalObjects Type
|
|
|
|
hi! link jsGlobalNodeObjects Type
|
2019-11-24 09:23:32 +00:00
|
|
|
hi! link jsException Exception
|
2019-04-21 11:42:15 +00:00
|
|
|
hi! link jsExceptions Type
|
|
|
|
hi! link jsBuiltins jsFuncName
|
|
|
|
hi! link jsNull Constant
|
|
|
|
hi! link jsUndefined Constant
|
|
|
|
hi! link jsOperatorKeyword Keyword
|
|
|
|
hi! link jsObjectKey Identifier
|
2019-11-03 11:14:41 +00:00
|
|
|
hi! link jsEnvComment Special
|
2019-11-19 19:20:46 +00:00
|
|
|
hi! link jsImport Include
|
|
|
|
hi! link jsExport Include
|
2020-08-01 16:52:11 +00:00
|
|
|
hi! link jsTemplateBraces PreProc
|
2019-11-19 19:20:46 +00:00
|
|
|
" }}}
|
|
|
|
|
2020-01-04 12:18:27 +00:00
|
|
|
" JSON {{{
|
|
|
|
hi! link jsonNull Constant
|
|
|
|
" }}}
|
|
|
|
|
2019-11-19 19:20:46 +00:00
|
|
|
" TypeScript {{{
|
|
|
|
let g:yats_host_keyword = 0
|
|
|
|
hi! link typescriptParens jsParens
|
|
|
|
hi! link typescriptBraces javaScriptBraces
|
|
|
|
hi! link typescriptOperator jsOperatorKeyword
|
2020-04-30 09:02:18 +00:00
|
|
|
hi! link typescriptKeywordOp typescriptOperator
|
2019-11-19 19:20:46 +00:00
|
|
|
hi! link typescriptCastKeyword typescriptOperator
|
|
|
|
hi! link typescriptMappedIn typescriptOperator
|
|
|
|
hi! link typescriptBinaryOp jsOperator
|
|
|
|
hi! link typescriptOptionalMark typescriptBinaryOp
|
|
|
|
hi! link typescriptIdentifier jsThis
|
|
|
|
hi! link typescriptArrowFunc jsArrowFunction
|
|
|
|
hi! link typescriptFuncTypeArrow typescriptArrowFunc
|
|
|
|
hi! link typescriptCall Variable
|
|
|
|
hi! link typescriptArrowFuncArg typescriptCall
|
|
|
|
hi! link typescriptFuncType typescriptCall
|
|
|
|
hi! link typescriptVariable jsStorageClass
|
|
|
|
hi! link typescriptAmbientDeclaration typescriptVariable
|
|
|
|
hi! link typescriptVariableDeclaration Variable
|
2019-11-23 09:01:23 +00:00
|
|
|
hi! link typescriptGlobal typescriptVariableDeclaration
|
2019-11-19 19:20:46 +00:00
|
|
|
hi! link typescriptTypeReference Type
|
|
|
|
hi! link typescriptTypeParameter typescriptTypeReference
|
|
|
|
hi! link typescriptConstructSignature Keyword
|
|
|
|
hi! link typescriptConstructorType typescriptConstructSignature
|
|
|
|
hi! link typescriptEndColons Delimiter
|
|
|
|
hi! link typescriptImport jsImport
|
|
|
|
hi! link typescriptExport jsExport
|
|
|
|
hi! link typescriptNull jsNull
|
2019-11-22 15:48:10 +00:00
|
|
|
hi! link typescriptObjectLabel jsObjectKey
|
2019-11-23 09:01:23 +00:00
|
|
|
hi! link typescriptMethodAccessor Keyword
|
|
|
|
hi! link typescriptClassName jsClassDefinition
|
|
|
|
hi! link typescriptClassHeritage jsClassDefinition
|
2019-11-24 09:23:32 +00:00
|
|
|
hi! link typescriptExceptions jsException
|
2020-02-24 22:25:20 +00:00
|
|
|
hi! link typescriptTry typescriptExceptions
|
2020-04-30 09:02:18 +00:00
|
|
|
hi! link typescriptEnumKeyword typescriptClassKeyword
|
|
|
|
hi! link typescriptModule jsImport
|
2020-07-12 11:59:58 +00:00
|
|
|
hi! link typescriptAbstract Keyword
|
2020-08-01 16:52:11 +00:00
|
|
|
hi! link typescriptTemplateSB PreProc
|
2019-04-21 11:42:15 +00:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Markdown {{{
|
|
|
|
hi! link mkdHeading Title
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Mail {{{
|
|
|
|
call s:hi('mailQuoted1', 0x8, '', '', '')
|
|
|
|
call s:hi('mailQuoted2', 0x9, '', '', '')
|
|
|
|
call s:hi('mailQuoted3', 0xA, '', '', '')
|
|
|
|
call s:hi('mailQuoted4', 0xB, '', '', '')
|
|
|
|
call s:hi('mailQuoted5', 0xD, '', '', '')
|
|
|
|
call s:hi('mailQuoted6', 0xE, '', '', '')
|
|
|
|
hi! link mailURL Underlined
|
|
|
|
hi! link mailEmail Underlined
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Python {{{
|
2020-02-10 12:37:12 +00:00
|
|
|
hi! link pythonBuiltinType Type
|
|
|
|
hi! link pythonBuiltinObj pythonFunction
|
|
|
|
hi! link pythonClassVar Variable
|
|
|
|
hi! link pythonOperatorKeyword Keyword
|
2019-04-21 11:42:15 +00:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Ruby {{{
|
2020-08-01 16:52:11 +00:00
|
|
|
hi! link rubyPseudoVariable Variable
|
|
|
|
hi! link rubyClassName Type
|
|
|
|
hi! link rubyAttribute rubyFunction
|
|
|
|
hi! link rubyConstant Constant
|
|
|
|
hi! link rubyInterpolationDelimiter PreProc
|
|
|
|
hi! link rubySymbol String
|
2020-08-08 08:00:43 +00:00
|
|
|
hi! link rubyStringDelimiter StringDelimiter
|
2020-08-01 16:52:11 +00:00
|
|
|
hi! link rubyRegexp Special
|
|
|
|
hi! link rubyRegexpDelimiter rubyRegexp
|
2019-04-21 11:42:15 +00:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Lua {{{
|
|
|
|
hi! link luaFuncCall Function
|
|
|
|
hi! link luaBraces Delimiter
|
|
|
|
" }}}
|
|
|
|
|
2019-08-02 13:13:50 +00:00
|
|
|
" Shell {{{
|
|
|
|
hi! link shQuote String
|
2019-04-21 11:42:15 +00:00
|
|
|
hi! link zshFunction Function
|
|
|
|
hi! link zshVariable Variable
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Spelling {{{
|
2020-08-06 16:45:41 +00:00
|
|
|
call s:hi('SpellBad', 'bg', '', 'undercurl', 0x8)
|
|
|
|
call s:hi('SpellLocal', 'bg', '', 'undercurl', 0xC)
|
|
|
|
call s:hi('SpellCap', 'bg', '', 'undercurl', 0xD)
|
|
|
|
call s:hi('SpellRare', 'bg', '', 'undercurl', 0xE)
|
2019-04-21 11:42:15 +00:00
|
|
|
" }}}
|