From 15bc732df4c2cacb8db21b01a0360206e9ce781b Mon Sep 17 00:00:00 2001 From: iroedius Date: Sat, 28 Apr 2018 07:34:59 +0200 Subject: [PATCH] allow to also disable trailing whitespace check per filetype --- autoload/airline/extensions/whitespace.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/whitespace.vim b/autoload/airline/extensions/whitespace.vim index ff08030..14fa181 100644 --- a/autoload/airline/extensions/whitespace.vim +++ b/autoload/airline/extensions/whitespace.vim @@ -61,7 +61,8 @@ function! airline#extensions#whitespace#check() let checks = get(b:, 'airline_whitespace_checks', get(g:, 'airline#extensions#whitespace#checks', s:default_checks)) let trailing = 0 - if index(checks, 'trailing') > -1 + let check = 'trailing' + if index(checks, check) > -1 && index(get(skip_check_ft, &ft, []), check) < 0 try let regexp = get(g:, 'airline#extensions#whitespace#trailing_regexp', '\s$') let trailing = search(regexp, 'nw')