mirror of
https://github.com/junegunn/limelight.vim.git
synced 2025-11-08 11:03:48 -05:00
Add g:limelight_priority
Can be used not to overrule hlsearch. Close #21.
This commit is contained in:
@@ -54,6 +54,10 @@ let g:limelight_paragraph_span = 1
|
|||||||
" and each paragraph starts with indentation
|
" and each paragraph starts with indentation
|
||||||
let g:limelight_bop = '^\s'
|
let g:limelight_bop = '^\s'
|
||||||
let g:limelight_eop = '\ze\n^\s'
|
let g:limelight_eop = '\ze\n^\s'
|
||||||
|
|
||||||
|
" Highlighting priority (default: 10)
|
||||||
|
" Set it to -1 not to overrule hlsearch
|
||||||
|
let g:limelight_priority = -1
|
||||||
```
|
```
|
||||||
|
|
||||||
Goyo.vim integration
|
Goyo.vim integration
|
||||||
|
|||||||
@@ -87,9 +87,10 @@ endfunction
|
|||||||
|
|
||||||
function! s:hl(startline, endline)
|
function! s:hl(startline, endline)
|
||||||
let w:limelight_match_ids = get(w:, 'limelight_match_ids', [])
|
let w:limelight_match_ids = get(w:, 'limelight_match_ids', [])
|
||||||
call add(w:limelight_match_ids, matchadd('LimelightDim', '\%<'.a:startline.'l'))
|
let priority = get(g:, 'limelight_priority', 10)
|
||||||
|
call add(w:limelight_match_ids, matchadd('LimelightDim', '\%<'.a:startline.'l', priority))
|
||||||
if a:endline > 0
|
if a:endline > 0
|
||||||
call add(w:limelight_match_ids, matchadd('LimelightDim', '\%>'.a:endline.'l'))
|
call add(w:limelight_match_ids, matchadd('LimelightDim', '\%>'.a:endline.'l', priority))
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user