mirror of
https://github.com/osyo-manga/vim-brightest.git
synced 2025-11-16 07:23:50 -05:00
Add g:brightest#ignore_word_pattern.
This commit is contained in:
@@ -14,6 +14,7 @@ let g:brightest#enable_filetypes = get(g:, "brightest#enable_filetypes", {})
|
|||||||
" let g:brightest#highlight_format = get(g:, "brightest#highlight_format", "\\<%s\\>")
|
" let g:brightest#highlight_format = get(g:, "brightest#highlight_format", "\\<%s\\>")
|
||||||
|
|
||||||
let g:brightest#ignore_syntax_list = get(g:, "brightest#ignore_syntax_list", [])
|
let g:brightest#ignore_syntax_list = get(g:, "brightest#ignore_syntax_list", [])
|
||||||
|
let g:brightest#ignore_word_pattern = get(g:, "brightest#ignore_word_pattern", "")
|
||||||
|
|
||||||
|
|
||||||
function! s:is_ignore_syntax_in_cursor()
|
function! s:is_ignore_syntax_in_cursor()
|
||||||
@@ -63,6 +64,11 @@ function! s:single_word(pattern, highlight, cursorline)
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let ignore_word_pattern = get(b:, "brightest_ignore_word_pattern", g:brightest#ignore_word_pattern)
|
||||||
|
if !empty(ignore_word_pattern) && word =~ ignore_word_pattern
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
let pattern = s:Prelude.escape_pattern(word)
|
let pattern = s:Prelude.escape_pattern(word)
|
||||||
|
|
||||||
if &cursorline && a:cursorline.group ==# "BrightestCursorLineBg"
|
if &cursorline && a:cursorline.group ==# "BrightestCursorLineBg"
|
||||||
|
|||||||
Reference in New Issue
Block a user