mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Update Ale.
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
function! ale_linters#nix#nix#Command(buffer, output, meta) abort
|
||||
let l:version = a:output[0][22:]
|
||||
|
||||
if l:version =~# '^\(2.4\|3\).*'
|
||||
if l:version =~# '^\(2.[4-9]\|3\).*'
|
||||
return 'nix-instantiate --log-format internal-json --parse -'
|
||||
else
|
||||
return 'nix-instantiate --parse -'
|
||||
|
18
sources_non_forked/ale/ale_linters/nix/statix.vim
Normal file
18
sources_non_forked/ale/ale_linters/nix/statix.vim
Normal file
@ -0,0 +1,18 @@
|
||||
scriptencoding utf-8
|
||||
" Author: David Houston <houstdav000>
|
||||
" Description: statix analysis and suggestions for Nix files
|
||||
|
||||
call ale#Set('nix_statix_check_executable', 'statix')
|
||||
call ale#Set('nix_statix_check_options', '')
|
||||
|
||||
function! ale_linters#nix#statix#GetCommand(buffer) abort
|
||||
return '%e check -o errfmt --stdin'
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'nix_statix_check_options'))
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('nix', {
|
||||
\ 'name': 'statix',
|
||||
\ 'executable': {b -> ale#Var(b, 'nix_statix_check_executable')},
|
||||
\ 'command': function('ale_linters#nix#statix#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#statix#Handle',
|
||||
\})
|
Reference in New Issue
Block a user