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

@@ -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(''))