From a5fab144aaddb36d1ee97b68418508ea39743b66 Mon Sep 17 00:00:00 2001 From: John Byrne Date: Tue, 29 Mar 2016 14:24:52 +0100 Subject: [PATCH] Made c_like_langs customisable via g:airline#extenstions#c_like_langs --- autoload/airline/extensions/whitespace.vim | 6 +----- doc/airline.txt | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/autoload/airline/extensions/whitespace.vim b/autoload/airline/extensions/whitespace.vim index c2535809..41949929 100644 --- a/autoload/airline/extensions/whitespace.vim +++ b/autoload/airline/extensions/whitespace.vim @@ -13,12 +13,9 @@ let s:long_format = get(g:, 'airline#extensions#whitespace#long_format', 'long[% let s:mixed_indent_file_format = get(g:, 'airline#extensions#whitespace#mixed_indent_file_format', 'mix-indent-file[%s]') let s:indent_algo = get(g:, 'airline#extensions#whitespace#mixed_indent_algo', 0) let s:skip_check_ft = {'make': ['indent', 'mixed-indent-file'] } - let s:max_lines = get(g:, 'airline#extensions#whitespace#max_lines', 20000) - let s:enabled = get(g:, 'airline#extensions#whitespace#enabled', 1) - -let s:c_like_langs = ['c', 'cpp', 'cuda', 'java', 'javascript', 'ld'] +let s:c_like_langs = get(g:, 'airline#extensions#c_like_langs', [ 'c', 'cpp', 'cuda', 'javascript', 'ld', 'php' ]) function! s:check_mixed_indent() if s:indent_algo == 1 @@ -142,4 +139,3 @@ function! airline#extensions#whitespace#init(...) autocmd CursorHold,BufWritePost * unlet! b:airline_whitespace_check augroup END endfunction - diff --git a/doc/airline.txt b/doc/airline.txt index 0df537c5..b40f36c2 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -491,6 +491,10 @@ eclim * configure custom trailing whitespace regexp rule > let g:airline#extensions#whitespace#trailing_regexp = '\s$' + +* configure, which filetypes have special treatment of /* */ comments, + matters for mix-indent-file algorithm: > + let airline#extensions#c_like_langs = ['c', 'cpp', 'cuda', 'javascript', 'ld', 'php'] < ------------------------------------- *airline-tabline* Note: If you're using the ctrlspace tabline only the option marked with (c)