From 18f93ac96b9f5a7ddcc1566a92179a247a7addc1 Mon Sep 17 00:00:00 2001 From: Dawid Zych Date: Mon, 19 Mar 2018 11:28:45 +0100 Subject: [PATCH] ALE: add option to disable line numbers --- autoload/airline/extensions/ale.vim | 7 ++++++- doc/airline.txt | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/ale.vim b/autoload/airline/extensions/ale.vim index 806fde4..c0419b2 100644 --- a/autoload/airline/extensions/ale.vim +++ b/autoload/airline/extensions/ale.vim @@ -5,6 +5,7 @@ scriptencoding utf-8 let s:error_symbol = get(g:, 'airline#extensions#ale#error_symbol', 'E:') let s:warning_symbol = get(g:, 'airline#extensions#ale#warning_symbol', 'W:') +let s:show_line_numbers = get(g:, 'airline#extensions#ale#show_line_numbers', 1) function! s:airline_ale_count(cnt, symbol) return a:cnt ? a:symbol. a:cnt : '' @@ -52,7 +53,11 @@ function! airline#extensions#ale#get(type) let num = is_err ? counts[0] : counts[1] endif - return s:airline_ale_count(num, symbol) . airline_ale_get_line_number(num, a:type) + if s:show_line_numbers == 1 + return s:airline_ale_count(num, symbol) . airline_ale_get_line_number(num, a:type) + else + return s:airline_ale_count(num, symbol) + endif endfunction function! airline#extensions#ale#get_warning() diff --git a/doc/airline.txt b/doc/airline.txt index ad6ce40..59a2eec 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -1020,6 +1020,9 @@ ale < * ale warning > let airline#extensions#ale#warning_symbol = 'W:' + +* ale show_line_numbers > + let airline#extensions#ale#show_line_numbers = 1 < * ale open_lnum_symbol > let airline#extensions#ale#open_lnum_symbol = '(L'