Skip to content

Commit 37c401b

Browse files
authored
Merge pull request #147 from yayayaty/arduino-support
associate arduino file-type with clang-format
2 parents d3d8b8b + 6ad05c4 commit 37c401b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Want to just sit back and let autoformat happen automatically? Add this to your
8181
```vim
8282
augroup autoformat_settings
8383
autocmd FileType bzl AutoFormatBuffer buildifier
84-
autocmd FileType c,cpp,proto,javascript AutoFormatBuffer clang-format
84+
autocmd FileType c,cpp,proto,javascript,arduino AutoFormatBuffer clang-format
8585
autocmd FileType dart AutoFormatBuffer dartfmt
8686
autocmd FileType go AutoFormatBuffer gofmt
8787
autocmd FileType gn AutoFormatBuffer gn

autoload/codefmt/clangformat.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function! codefmt#clangformat#GetFormatter() abort
8181
if &filetype is# 'c' || &filetype is# 'cpp' ||
8282
\ &filetype is# 'proto' || &filetype is# 'javascript' ||
8383
\ &filetype is# 'objc' || &filetype is# 'objcpp' ||
84-
\ &filetype is# 'typescript'
84+
\ &filetype is# 'typescript' || &filetype is# 'arduino'
8585
return 1
8686
endif
8787
" Version 3.6 adds support for java

0 commit comments

Comments
 (0)