Update some plugins.
This commit is contained in:
parent
11e2e2c0c6
commit
f6ba361e3e
4 changed files with 8 additions and 13 deletions
|
@ -34,7 +34,7 @@ let g:python3_host_prog="/path/to/python/executable/"
|
|||
Put this in your `.vimrc`.
|
||||
|
||||
```vim
|
||||
Plugin 'Chiel92/vim-autoformat'
|
||||
Plugin 'vim-autoformat/vim-autoformat'
|
||||
```
|
||||
|
||||
Then restart vim and run `:PluginInstall`. Alternatively, you could run `:source $MYVIMRC`
|
||||
|
|
|
@ -250,9 +250,8 @@ stdoutdata, stderrdata = p.communicate(text)
|
|||
formattername = vim.eval('b:formatters[s:index]')
|
||||
if stderrdata:
|
||||
if verbose > 0:
|
||||
print('Formatter {} has errors: {}'.format(formattername, stderrdata))
|
||||
vim.command('return 1')
|
||||
elif p.returncode > 0:
|
||||
print('Formatter {} stderr: {}'.format(formattername, stderrdata))
|
||||
if p.returncode > 0:
|
||||
if verbose > 0:
|
||||
print('Formatter {} gives nonzero returncode: {}'.format(formattername, p.returncode))
|
||||
vim.command('return 1')
|
||||
|
@ -311,8 +310,8 @@ else:
|
|||
formattername = vim.eval('b:formatters[s:index]')
|
||||
if stderrdata:
|
||||
if verbose > 0:
|
||||
print('Formatter {} has errors: {}'.format(formattername, stderrdata))
|
||||
elif p.returncode > 0:
|
||||
print('Formatter {} stderr: {}'.format(formattername, stderrdata))
|
||||
if p.returncode > 0:
|
||||
if verbose > 0:
|
||||
print('Formatter {} gives nonzero returncode: {}'.format(formattername, p.returncode))
|
||||
elif not stdoutdata:
|
||||
|
|
|
@ -213,11 +213,7 @@ endif
|
|||
" So we create a tmp file here and then remove it afterwards
|
||||
if !exists('g:formatdef_xo_javascript')
|
||||
function! g:BuildXOLocalCmd()
|
||||
let l:xo_js_tmp_file = fnameescape(tempname().".js")
|
||||
let content = getline('1', '$')
|
||||
call writefile(content, l:xo_js_tmp_file)
|
||||
return "xo --fix ".l:xo_js_tmp_file." 1> /dev/null; exit_code=$?
|
||||
\ cat ".l:xo_js_tmp_file."; rm -f ".l:xo_js_tmp_file."; exit $exit_code"
|
||||
return "npx xo --fix --stdin --stdin-filename ".bufname('%')
|
||||
endfunction
|
||||
let g:formatdef_xo_javascript = "g:BuildXOLocalCmd()"
|
||||
endif
|
||||
|
@ -310,7 +306,7 @@ if !exists('g:formatdef_eslint_local')
|
|||
let l:eslint_tmp_file = g:BuildESLintTmpFile(l:path, l:ext)
|
||||
let content = getline('1', '$')
|
||||
call writefile(content, l:eslint_tmp_file)
|
||||
return l:prog." -c ".l:cfg." --fix ".l:eslint_tmp_file." 1> /dev/null; exit_code=$?
|
||||
return l:prog." -c ".l:cfg." --fix ".l:eslint_tmp_file." 1> /dev/null; exit_code=$?;
|
||||
\ cat ".l:eslint_tmp_file."; rm -f ".l:eslint_tmp_file."; exit $exit_code"
|
||||
endfunction
|
||||
let g:formatdef_eslint_local = "g:BuildESLintLocalCmd()"
|
||||
|
|
|
@ -3,7 +3,7 @@ GEM
|
|||
specs:
|
||||
coderay (1.1.1)
|
||||
diff-lcs (1.2.5)
|
||||
diffy (3.2.0)
|
||||
diffy (3.4.1)
|
||||
method_source (0.8.2)
|
||||
parallel (1.12.1)
|
||||
parallel_tests (2.21.2)
|
||||
|
|
Loading…
Reference in a new issue