diff options
-rw-r--r-- | autoload/ale/debugging.vim | 1 | ||||
-rw-r--r-- | autoload/ale/sign.vim | 3 | ||||
-rw-r--r-- | doc/ale.txt | 14 | ||||
-rw-r--r-- | test/test_ale_info.vader | 3 |
4 files changed, 18 insertions, 3 deletions
diff --git a/autoload/ale/debugging.vim b/autoload/ale/debugging.vim index 379c0d73..4e134f8c 100644 --- a/autoload/ale/debugging.vim +++ b/autoload/ale/debugging.vim @@ -50,6 +50,7 @@ let s:global_variable_list = [ \ 'ale_sign_style_error', \ 'ale_sign_style_warning', \ 'ale_sign_warning', +\ 'ale_sign_highlight_linenrs', \ 'ale_statusline_format', \ 'ale_type_map', \ 'ale_use_global_executables', diff --git a/autoload/ale/sign.vim b/autoload/ale/sign.vim index eb0dd1cd..829de118 100644 --- a/autoload/ale/sign.vim +++ b/autoload/ale/sign.vim @@ -20,6 +20,7 @@ let g:ale_sign_info = get(g:, 'ale_sign_info', g:ale_sign_warning) let g:ale_sign_offset = get(g:, 'ale_sign_offset', 1000000) " This flag can be set to 1 to keep sign gutter always open let g:ale_sign_column_always = get(g:, 'ale_sign_column_always', 0) +let g:ale_sign_highlight_linenrs = get(g:, 'ale_sign_highlight_linenrs', 0) if !hlexists('ALEErrorSign') highlight link ALEErrorSign error @@ -82,7 +83,7 @@ execute 'sign define ALEInfoSign text=' . s:EscapeSignText(g:ale_sign_info) \ . ' texthl=ALEInfoSign linehl=ALEInfoLine' sign define ALEDummySign -if has('nvim-0.3.2') +if g:ale_sign_highlight_linenrs && has('nvim-0.3.2') if !hlexists('ALEErrorSignLineNr') highlight link ALEErrorSignLineNr CursorLineNr endif diff --git a/doc/ale.txt b/doc/ale.txt index beca8546..7fa89243 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -1437,8 +1437,9 @@ g:ale_set_signs *g:ale_set_signs* |ALEWarningLine| - All items with `'type': 'W'` |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. + With Neovim 0.3.2 or higher, ALE can use `numhl` option to highlight 'number' + column. It uses the following highlight groups. To enable this feature, + see |g:ale_sign_highlight_linenrs|. |ALEErrorSignLineNr| - Items with `'type': 'E'` |ALEWarningSignLineNr| - Items with `'type': 'W'` @@ -1552,6 +1553,15 @@ g:ale_sign_warning *g:ale_sign_warning* The sign for warnings in the sign gutter. +g:ale_sign_highlight_linenrs *g:ale_sign_highlight_linenrs* + + Type: |Number| + Default: `0` + + This option controls whether ALE should use `numhl` option to highlight 'number' + column in supported vim version. + + g:ale_update_tagstack *g:ale_update_tagstack* *b:ale_update_tagstack* Type: |Number| diff --git a/test/test_ale_info.vader b/test/test_ale_info.vader index e1208679..2bc8c635 100644 --- a/test/test_ale_info.vader +++ b/test/test_ale_info.vader @@ -47,6 +47,7 @@ Before: Save g:ale_sign_style_error Save g:ale_sign_style_warning Save g:ale_sign_warning + Save g:ale_sign_highlight_linenrs Save g:ale_statusline_format Save g:ale_type_map Save g:ale_use_global_executables @@ -102,6 +103,7 @@ Before: let g:ale_sign_style_error = '>>' let g:ale_sign_style_warning = '--' let g:ale_sign_warning = '--' + let g:ale_sign_highlight_linenrs = 0 let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK'] let g:ale_type_map = {} let g:ale_use_global_executables = v:null @@ -178,6 +180,7 @@ Before: \ 'let g:ale_sign_style_error = ''>>''', \ 'let g:ale_sign_style_warning = ''--''', \ 'let g:ale_sign_warning = ''--''', + \ 'let g:ale_sign_highlight_linenrs = 0', \ 'let g:ale_statusline_format = [''%d error(s)'', ''%d warning(s)'', ''OK'']', \ 'let g:ale_type_map = {}', \ 'let g:ale_use_global_executables = v:null', |