summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-11-10 10:57:11 +0000
committerGitHub <noreply@github.com>2018-11-10 10:57:11 +0000
commit90f2875f29b3b74a3319cdfd88cbff00af389b67 (patch)
tree424a92ee2bd9fc6f559a23c0c0ec455dd23b4459 /autoload
parentf8d3ffb60e132e3c4b0b853b9ae21b49acdacd5d (diff)
parentb9fb62a4cd302486914403e41676e78b4cfdf0e3 (diff)
downloadale-90f2875f29b3b74a3319cdfd88cbff00af389b67.zip
Merge pull request #2053 from andreypopp/fix-ocamlformat-stdin-stdout
Make ocamlformat work without temporary files
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/fixers/ocamlformat.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/autoload/ale/fixers/ocamlformat.vim b/autoload/ale/fixers/ocamlformat.vim
index fac142aa..9b7c3e12 100644
--- a/autoload/ale/fixers/ocamlformat.vim
+++ b/autoload/ale/fixers/ocamlformat.vim
@@ -5,14 +5,14 @@ call ale#Set('ocaml_ocamlformat_executable', 'ocamlformat')
call ale#Set('ocaml_ocamlformat_options', '')
function! ale#fixers#ocamlformat#Fix(buffer) abort
+ let l:filename = expand('#' . a:buffer . ':p')
let l:executable = ale#Var(a:buffer, 'ocaml_ocamlformat_executable')
let l:options = ale#Var(a:buffer, 'ocaml_ocamlformat_options')
return {
\ 'command': ale#Escape(l:executable)
\ . (empty(l:options) ? '' : ' ' . l:options)
- \ . ' --inplace'
- \ . ' %t',
- \ 'read_temporary_file': 1,
+ \ . ' --name=' . ale#Escape(l:filename)
+ \ . ' -'
\}
endfunction