Add alejandra for nix (#4435)

- Fixes https://github.com/dense-analysis/ale/issues/4434
This commit is contained in:
Nathan Henrie authored and GitHub committed 2023-02-07 17:24:52 +09:00
1 parent 45a3e3f574
commit e1ae009bac
7 files changed
+63

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
call ale#Set('nix_alejandra_executable', 'alejandra')
call ale#Set('nix_alejandra_options', '')
function! ale#fixers#alejandra#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'nix_alejandra_executable')
let l:options = ale#Var(a:buffer, 'nix_alejandra_options')
return {
\ 'command': ale#Escape(l:executable)
\ . (empty(l:options) ? '' : ' ' . l:options)
\ . ' -- -'
\}
endfunction