vim: respect editorconfig files when prettier runs, if one exists

parent 9634cfb3
...@@ -27,11 +27,11 @@ let g:ale_echo_msg_warning_str='[WARNING]' ...@@ -27,11 +27,11 @@ let g:ale_echo_msg_warning_str='[WARNING]'
let g:ale_echo_msg_format = '%severity% %linter% -> [%code%] -> %s' let g:ale_echo_msg_format = '%severity% %linter% -> [%code%] -> %s'
let g:ale_javascript_prettier_use_local_config = 1 let g:ale_javascript_prettier_use_local_config = 1
function! s:PRETTIER_OPTIONS() function! s:PRETTIER_OPTIONS()
return '--config-precedence prefer-file --single-quote --no-bracket-spacing --no-editorconfig --prose-wrap always --trailing-comma all --no-semi --end-of-line lf --print-width ' . &textwidth return '--config-precedence prefer-file --single-quote --no-bracket-spacing --prose-wrap always --trailing-comma all --no-semi --end-of-line lf --print-width ' . &textwidth
endfunction endfunction
let g:ale_javascript_prettier_options = s:PRETTIER_OPTIONS() let g:ale_javascript_prettier_options = <SID>PRETTIER_OPTIONS()
" Auto update the option when textwidth is dynamically set or changed in a ftplugin file " Auto update the option when textwidth is dynamically set or changed in a ftplugin file
au! OptionSet textwidth let g:ale_javascript_prettier_options = s:PRETTIER_OPTIONS() au! OptionSet textwidth let g:ale_javascript_prettier_options = <SID>PRETTIER_OPTIONS()
let g:ale_linter_aliases = { let g:ale_linter_aliases = {
\ 'mail': 'markdown', \ 'mail': 'markdown',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment