1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-28 00:40:07 +08:00
SpaceVim/test/api/vim/highlight.vader
Theodore Ni 1c6b15619f
Change how highlight syntax IDs are looked up. (#3521)
There is a function called hlID that can be used to look up the syntax
ID directly. On my laptop, this saves a bit over 100ms during start up
when loading the tabline and the statusline.
2020-05-15 21:44:02 +08:00

21 lines
747 B
Plaintext

Execute ( SpaceVim api: vim#highlight ):
let hi = SpaceVim#api#import('vim#highlight')
set termguicolors
highlight TestAPIVimHighlight ctermfg=11 guifg=#89DDFF guibg=#212121
let test_api_hi = hi.group2dict('TestAPIVimHighlight')
AssertEqual test_api_hi.guibg, '#212121'
AssertEqual test_api_hi.guifg, '#89ddff'
AssertEqual test_api_hi.ctermfg, '11'
let unknown_hi = hi.group2dict('UnknownHighlightGroup')
AssertEqual unknown_hi.name, ''
AssertEqual unknown_hi.ctermbg, ''
AssertEqual unknown_hi.ctermfg, ''
AssertEqual unknown_hi.bold, ''
AssertEqual unknown_hi.italic, ''
AssertEqual unknown_hi.reverse, ''
AssertEqual unknown_hi.underline, ''
AssertEqual unknown_hi.guibg, ''
AssertEqual unknown_hi.guifg, ''