This commit is contained in:
Adam Stankiewicz
2020-01-25 16:56:10 +01:00
parent 967486dd71
commit 35ea4d2b90
14 changed files with 84 additions and 45 deletions

View File

@@ -34,14 +34,16 @@ endif
function! DhallFormat()
let cursor = getpos('.')
exec 'silent %!dhall format'
exec 'normal! gg'
exec 'silent !dhall format --inplace ' . expand('%')
exec 'e'
call setpos('.', cursor)
endfunction
if exists('g:dhall_format')
if g:dhall_format == 1
augroup dhall
au BufWritePre *.dhall call DhallFormat()
au BufWritePost *.dhall call DhallFormat()
augroup END
endif
endif

View File

@@ -54,7 +54,7 @@ function! s:HandleRunResults(exitcode, listf)
if filereadable(a:listf) && l:insert_pos != 0
for line in readfile(a:listf)
call append(l:insert_pos, 'Attach: '.line)
call append(l:insert_pos, 'Attach: '.escape(line, " "))
let l:insert_pos += 1
endfor
endif