Made c_like_langs customisable via g:airline#extenstions#c_like_langs

This commit is contained in:
John Byrne 2016-03-29 14:24:52 +01:00 committed by Christian Brabandt
parent 3f2247593a
commit a5fab144aa
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -491,6 +491,10 @@ eclim <https://eclim.org>
* 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)