Add alejandra for nix (#4435)

- Fixes https://github.com/dense-analysis/ale/issues/4434
This commit is contained in:
Nathan Henrie
2023-02-07 01:24:52 -07:00
committed by GitHub
parent 45a3e3f574
commit e1ae009bac
7 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
Before:
Save g:ale_nix_alejandra_executable
Save g:ale_nix_alejandra_options
After:
Restore
Execute(The alejandra callback should return the correct default values):
AssertEqual
\ {
\ 'command': ale#Escape('alejandra') . ' -- -'
\ },
\ ale#fixers#alejandra#Fix(bufnr(''))
Execute(The alejandra executable and options should be configurable):
let g:ale_nix_alejandra_executable = '/path/to/alejandra'
let g:ale_nix_alejandra_options = '-q'
AssertEqual
\ {
\ 'command': ale#Escape('/path/to/alejandra')
\ . ' -q -- -',
\ },
\ ale#fixers#alejandra#Fix(bufnr(''))