mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-18 14:29:50 +08:00
Add setting for numhl highlights (#2637)
* Add setting for numhl highlights * Add doc for numhl feature
This commit is contained in:
@@ -82,6 +82,34 @@ execute 'sign define ALEInfoSign text=' . s:EscapeSignText(g:ale_sign_info)
|
|||||||
\ . ' texthl=ALEInfoSign linehl=ALEInfoLine'
|
\ . ' texthl=ALEInfoSign linehl=ALEInfoLine'
|
||||||
sign define ALEDummySign
|
sign define ALEDummySign
|
||||||
|
|
||||||
|
if has('nvim-0.3.2')
|
||||||
|
if !hlexists('ALEErrorSignLineNr')
|
||||||
|
highlight link ALEErrorSignLineNr CursorLineNr
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !hlexists('ALEStyleErrorSignLineNr')
|
||||||
|
highlight link ALEStyleErrorSignLineNr CursorLineNr
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !hlexists('ALEWarningSignLineNr')
|
||||||
|
highlight link ALEWarningSignLineNr CursorLineNr
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !hlexists('ALEStyleWarningSignLineNr')
|
||||||
|
highlight link ALEStyleWarningSignLineNr CursorLineNr
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !hlexists('ALEInfoSignLineNr')
|
||||||
|
highlight link ALEInfoSignLineNr CursorLineNr
|
||||||
|
endif
|
||||||
|
|
||||||
|
sign define ALEErrorSign numhl=ALEErrorSignLineNr
|
||||||
|
sign define ALEStyleErrorSign numhl=ALEStyleErrorSignLineNr
|
||||||
|
sign define ALEWarningSign numhl=ALEWarningSignLineNr
|
||||||
|
sign define ALEStyleWarningSign numhl=ALEStyleWarningSignLineNr
|
||||||
|
sign define ALEInfoSign numhl=ALEInfoSignLineNr
|
||||||
|
endif
|
||||||
|
|
||||||
function! ale#sign#GetSignName(sublist) abort
|
function! ale#sign#GetSignName(sublist) abort
|
||||||
let l:priority = g:ale#util#style_warning_priority
|
let l:priority = g:ale#util#style_warning_priority
|
||||||
|
|
||||||
|
|||||||
+54
@@ -1426,6 +1426,15 @@ g:ale_set_signs *g:ale_set_signs*
|
|||||||
|ALEWarningLine| - All items with `'type': 'W'`
|
|ALEWarningLine| - All items with `'type': 'W'`
|
||||||
|ALEInfoLine| - All items with `'type': 'I'`
|
|ALEInfoLine| - All items with `'type': 'I'`
|
||||||
|
|
||||||
|
With Neovim 0.3.2 or higher, ALE uses `numhl` option to highlight 'number'
|
||||||
|
column. It uses the following highlight groups.
|
||||||
|
|
||||||
|
|ALEErrorSignLineNr| - Items with `'type': 'E'`
|
||||||
|
|ALEWarningSignLineNr| - Items with `'type': 'W'`
|
||||||
|
|ALEInfoSignLineNr| - Items with `'type': 'I'`
|
||||||
|
|ALEStyleErrorSignLineNr| - Items with `'type': 'E'` and `'sub_type': 'style'`
|
||||||
|
|ALEStyleWarningSignLineNr| - Items with `'type': 'W'` and `'sub_type': 'style'`
|
||||||
|
|
||||||
The markers for the highlights can be customized with the following options:
|
The markers for the highlights can be customized with the following options:
|
||||||
|
|
||||||
|g:ale_sign_error|
|
|g:ale_sign_error|
|
||||||
@@ -1710,6 +1719,15 @@ ALEErrorSign *ALEErrorSign*
|
|||||||
The highlight for error signs. See |g:ale_set_signs|.
|
The highlight for error signs. See |g:ale_set_signs|.
|
||||||
|
|
||||||
|
|
||||||
|
ALEErrorSignLineNr *ALEErrorSignLineNr*
|
||||||
|
|
||||||
|
Default: `highlight link ALEErrorSignLineNr CursorLineNr`
|
||||||
|
|
||||||
|
The highlight for error signs. See |g:ale_set_signs|.
|
||||||
|
|
||||||
|
NOTE: This highlight is only available on Neovim 0.3.2 or higher.
|
||||||
|
|
||||||
|
|
||||||
ALEInfo *ALEInfo.*
|
ALEInfo *ALEInfo.*
|
||||||
*ALEInfo-highlight*
|
*ALEInfo-highlight*
|
||||||
Default: `highlight link ALEInfo ALEWarning`
|
Default: `highlight link ALEInfo ALEWarning`
|
||||||
@@ -1734,6 +1752,15 @@ ALEInfoLine *ALEInfoLine*
|
|||||||
See |g:ale_set_signs| and |g:ale_set_highlights|.
|
See |g:ale_set_signs| and |g:ale_set_highlights|.
|
||||||
|
|
||||||
|
|
||||||
|
ALEInfoSignLineNr *ALEInfoSignLineNr*
|
||||||
|
|
||||||
|
Default: `highlight link ALEInfoSignLineNr CursorLineNr`
|
||||||
|
|
||||||
|
The highlight for error signs. See |g:ale_set_signs|.
|
||||||
|
|
||||||
|
NOTE: This highlight is only available on Neovim 0.3.2 or higher.
|
||||||
|
|
||||||
|
|
||||||
ALEStyleError *ALEStyleError*
|
ALEStyleError *ALEStyleError*
|
||||||
|
|
||||||
Default: `highlight link ALEStyleError ALEError`
|
Default: `highlight link ALEStyleError ALEError`
|
||||||
@@ -1748,6 +1775,15 @@ ALEStyleErrorSign *ALEStyleErrorSign*
|
|||||||
The highlight for style error signs. See |g:ale_set_signs|.
|
The highlight for style error signs. See |g:ale_set_signs|.
|
||||||
|
|
||||||
|
|
||||||
|
ALEStyleErrorSignLineNr *ALEStyleErrorSignLineNr*
|
||||||
|
|
||||||
|
Default: `highlight link ALEStyleErrorSignLineNr CursorLineNr`
|
||||||
|
|
||||||
|
The highlight for error signs. See |g:ale_set_signs|.
|
||||||
|
|
||||||
|
NOTE: This highlight is only available on Neovim 0.3.2 or higher.
|
||||||
|
|
||||||
|
|
||||||
ALEStyleWarning *ALEStyleWarning*
|
ALEStyleWarning *ALEStyleWarning*
|
||||||
|
|
||||||
Default: `highlight link ALEStyleWarning ALEError`
|
Default: `highlight link ALEStyleWarning ALEError`
|
||||||
@@ -1762,6 +1798,15 @@ ALEStyleWarningSign *ALEStyleWarningSign*
|
|||||||
The highlight for style warning signs. See |g:ale_set_signs|.
|
The highlight for style warning signs. See |g:ale_set_signs|.
|
||||||
|
|
||||||
|
|
||||||
|
ALEStyleWarningSignLineNr *ALEStyleWarningSignLineNr*
|
||||||
|
|
||||||
|
Default: `highlight link ALEStyleWarningSignLineNr CursorLineNr`
|
||||||
|
|
||||||
|
The highlight for error signs. See |g:ale_set_signs|.
|
||||||
|
|
||||||
|
NOTE: This highlight is only available on Neovim 0.3.2 or higher.
|
||||||
|
|
||||||
|
|
||||||
ALEVirtualTextError *ALEVirtualTextError*
|
ALEVirtualTextError *ALEVirtualTextError*
|
||||||
|
|
||||||
Default: `highlight link ALEVirtualTextError ALEError`
|
Default: `highlight link ALEVirtualTextError ALEError`
|
||||||
@@ -1821,6 +1866,15 @@ ALEWarningSign *ALEWarningSign*
|
|||||||
The highlight for warning signs. See |g:ale_set_signs|.
|
The highlight for warning signs. See |g:ale_set_signs|.
|
||||||
|
|
||||||
|
|
||||||
|
ALEWarningSignLineNr *ALEWarningSignLineNr*
|
||||||
|
|
||||||
|
Default: `highlight link ALEWarningSignLineNr CursorLineNr`
|
||||||
|
|
||||||
|
The highlight for error signs. See |g:ale_set_signs|.
|
||||||
|
|
||||||
|
NOTE: This highlight is only available on Neovim 0.3.2 or higher.
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
7. Linter/Fixer Options *ale-integration-options*
|
7. Linter/Fixer Options *ale-integration-options*
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user