Closed dbarnett closed 1 year ago
We should define a little filetype check helper to turn formatters' common (and ugly) checks against multiple filetypes like
if &filetype is# 'c' || &filetype is# 'cpp' || \ &filetype is# 'proto' || &filetype is# 'javascript' || \ &filetype is# 'objc' || &filetype is# 'objcpp' || \ &filetype is# 'typescript' || &filetype is# 'arduino'
into a simpler concise function call like
if codefmt#formatterhelpers#FiletypeMatches( \ &filetype, \ ['c', 'cpp', 'proto', 'javascript', 'objc', 'objcpp', 'typescript', 'arduino'])
It could also help ensure they properly support dotted filenames like 'c.doxygen' (see :help 'filetype').
We should define a little filetype check helper to turn formatters' common (and ugly) checks against multiple filetypes like
into a simpler concise function call like
It could also help ensure they properly support dotted filenames like 'c.doxygen' (see :help 'filetype').