From a141918faac94543da0b06868c4d68e5df9fbc17 Mon Sep 17 00:00:00 2001 From: Mangero Date: Sun, 17 Jun 2018 22:50:36 +0200 Subject: [PATCH] Add Arduino to list of C-like languages Add 'arduino' filetype to list of C-like languages. This is needed in order to avoid mix-indent-file warnings when using hard tabs for indentation in Arduino source files (*.ino, *.pde) containing top level block comments with leading space before a '*'. Similar to: 460ed028645bdb52ebb4f83a84e64dbf30861ff1 Original fix: 8fde76dd63675b54c918d686036e8de9e057ae8d --- autoload/airline/extensions/whitespace.vim | 2 +- doc/airline.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/airline/extensions/whitespace.vim b/autoload/airline/extensions/whitespace.vim index 14fa1819..8833ef08 100644 --- a/autoload/airline/extensions/whitespace.vim +++ b/autoload/airline/extensions/whitespace.vim @@ -31,7 +31,7 @@ endfunction function! s:check_mixed_indent_file() let c_like_langs = get(g:, 'airline#extensions#c_like_langs', - \ [ 'c', 'cpp', 'cuda', 'go', 'javascript', 'ld', 'php' ]) + \ [ 'arduino', 'c', 'cpp', 'cuda', 'go', 'javascript', 'ld', 'php' ]) if index(c_like_langs, &ft) > -1 " for C-like languages: allow /** */ comment style with one space before the '*' let head_spc = '\v(^ +\*@!)' diff --git a/doc/airline.txt b/doc/airline.txt index ec3f37e4..0cdd7070 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -666,7 +666,7 @@ eclim * configure, which filetypes have special treatment of /* */ comments, matters for mix-indent-file algorithm: > - let airline#extensions#c_like_langs = ['c', 'cpp', 'cuda', 'go', 'javascript', 'ld', 'php'] + let airline#extensions#c_like_langs = ['arduino', 'c', 'cpp', 'cuda', 'go', 'javascript', 'ld', 'php'] < * disable whitespace checking for an individual buffer > " Checking is enabled by default because b:airline_whitespace_disabled