mirror of https://github.com/dense-analysis/ale
fix(biome): use temp file instead of stdin (#4775)
biome handles utf8 characters differently between files and stdin, and in some cases can replace emojis with ascii characters when using stdin refs: biomejs/biome#2604
This commit is contained in:
parent
c7c41e1574
commit
0cd64c87bf
|
@ -3,8 +3,9 @@ function! ale#fixers#biome#Fix(buffer) abort
|
||||||
let l:options = ale#Var(a:buffer, 'biome_options')
|
let l:options = ale#Var(a:buffer, 'biome_options')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
\ 'read_temporary_file': 1,
|
||||||
\ 'command': ale#Escape(l:executable) . ' format'
|
\ 'command': ale#Escape(l:executable) . ' format'
|
||||||
\ . (!empty(l:options) ? ' ' . l:options : '')
|
\ . (!empty(l:options) ? ' ' . l:options : '')
|
||||||
\ . ' --stdin-file-path=%s',
|
\ . ' %t'
|
||||||
\}
|
\}
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
@ -9,7 +9,8 @@ Execute(The default biome command should be correct):
|
||||||
|
|
||||||
AssertFixer
|
AssertFixer
|
||||||
\ {
|
\ {
|
||||||
|
\ 'read_temporary_file': 1,
|
||||||
\ 'command': ale#Escape('biome')
|
\ 'command': ale#Escape('biome')
|
||||||
\ . ' format --stdin-file-path=%s'
|
\ . ' format %t'
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue