no default buildifier defined for bzl files
gtianyi opened this issue · comments
Tianyi Gu commented
Could you add the default buildifier for BUILD?
Error detected while processing function <SNR>34_TryAllFormatters:
line 35:
No format definition found in 'g:formatdef_buildifier'
chtenb commented
What are you trying to do?
Tianyi Gu commented
Thanks @chtenb. Currently, we don't have a default formatdef_buildifier
set correctly for BUILD
file formatter.
Add let g:formatdef_buildifier="'buildifier'"
to the init.vim
works, but it would be nicer if we can add the default to the plugin source, so it can work out-of-box.
Maybe we can add something like
if !exists('g:formatdef_buildifier')
let g:formatdef_buildifier="'buildifier'"
endif
at
https://github.com/vim-autoformat/vim-autoformat/blob/master/plugin/defaults.vim#L88
I can help raise a PR if needed.
chtenb commented
Yes, you can open a PR if you think others would benefit.