chang fishindent to fish_indent
This commit is contained in:
parent
194660660d
commit
a49f664aea
4 changed files with 15 additions and 15 deletions
|
@ -1,12 +1,12 @@
|
||||||
" Author: Chen YuanYuan <cyyever@outlook.com>
|
" Author: Chen YuanYuan <cyyever@outlook.com>
|
||||||
" Description: Integration of fish_indent with ALE.
|
" Description: Integration of fish_indent with ALE.
|
||||||
|
|
||||||
call ale#Set('fish_fishindent_executable', 'fish_indent')
|
call ale#Set('fish_fish_indent_executable', 'fish_indent')
|
||||||
call ale#Set('fish_fishindent_options', '')
|
call ale#Set('fish_fish_indent_options', '')
|
||||||
|
|
||||||
function! ale#fixers#fish_indent#Fix(buffer) abort
|
function! ale#fixers#fish_indent#Fix(buffer) abort
|
||||||
let l:executable = ale#Var(a:buffer, 'fish_fishindent_executable')
|
let l:executable = ale#Var(a:buffer, 'fish_fish_indent_executable')
|
||||||
let l:options = ale#Var(a:buffer, 'fish_fishindent_options')
|
let l:options = ale#Var(a:buffer, 'fish_fish_indent_options')
|
||||||
let l:filename = ale#Escape(bufname(a:buffer))
|
let l:filename = ale#Escape(bufname(a:buffer))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -11,17 +11,17 @@ If ALE is not showing any errors but your file does not run as expected, run
|
||||||
`fish -n <file.fish>` from the command line.
|
`fish -n <file.fish>` from the command line.
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
fish_indent *ale-fish-fishindent*
|
fish_indent *ale-fish-fish_indent*
|
||||||
|
|
||||||
g:ale_fish_fishindent_executable *g:ale_fish_fishindent_executable*
|
g:ale_fish_fish_indent_executable *g:ale_fish_fish_indent_executable*
|
||||||
*b:ale_fish_fishindent_executable*
|
*b:ale_fish_fish_indent_executable*
|
||||||
Type: |String|
|
Type: |String|
|
||||||
Default: `'fish_indent'`
|
Default: `'fish_indent'`
|
||||||
|
|
||||||
This variable can be changed to use a different executable for fish_indent.
|
This variable can be changed to use a different executable for fish_indent.
|
||||||
|
|
||||||
g:ale_fish_fishindent_options *g:ale_fish_fishindent_options*
|
g:ale_fish_fish_indent_options *g:ale_fish_fish_indent_options*
|
||||||
*b:ale_fish_fishindent_options*
|
*b:ale_fish_fish_indent_options*
|
||||||
Type: |String|
|
Type: |String|
|
||||||
Default: `''`
|
Default: `''`
|
||||||
|
|
||||||
|
|
|
@ -2594,7 +2594,7 @@ documented in additional help files.
|
||||||
eruby...................................|ale-eruby-options|
|
eruby...................................|ale-eruby-options|
|
||||||
ruumba................................|ale-eruby-ruumba|
|
ruumba................................|ale-eruby-ruumba|
|
||||||
fish....................................|ale-fish-options|
|
fish....................................|ale-fish-options|
|
||||||
fish_indent...........................|ale-fish-fishindent|
|
fish_indent...........................|ale-fish-fish_indent|
|
||||||
fortran.................................|ale-fortran-options|
|
fortran.................................|ale-fortran-options|
|
||||||
gcc...................................|ale-fortran-gcc|
|
gcc...................................|ale-fortran-gcc|
|
||||||
language_server.......................|ale-fortran-language-server|
|
language_server.......................|ale-fortran-language-server|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
Before:
|
Before:
|
||||||
Save g:ale_fish_fishindent_executable
|
Save g:ale_fish_fish_indent_executable
|
||||||
Save g:ale_fish_fishindent_options
|
Save g:ale_fish_fish_indent_options
|
||||||
|
|
||||||
" Use an invalid global executable, so we don't match it.
|
" Use an invalid global executable, so we don't match it.
|
||||||
let g:ale_fish_fishindent_executable = 'xxxinvalid'
|
let g:ale_fish_fish_indent_executable = 'xxxinvalid'
|
||||||
let g:ale_fish_fishindent_options = ''
|
let g:ale_fish_fish_indent_options = ''
|
||||||
|
|
||||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ Execute(The fish_indent callback should return the correct default values):
|
||||||
\ ale#fixers#fish_indent#Fix(bufnr(''))
|
\ ale#fixers#fish_indent#Fix(bufnr(''))
|
||||||
|
|
||||||
Execute(The fish_indent callback should include custom fish_indent options):
|
Execute(The fish_indent callback should include custom fish_indent options):
|
||||||
let g:ale_fish_fishindent_options = "-d"
|
let g:ale_fish_fish_indent_options = "-d"
|
||||||
call ale#test#SetFilename('../fish_files/testfile.fish')
|
call ale#test#SetFilename('../fish_files/testfile.fish')
|
||||||
|
|
||||||
AssertEqual
|
AssertEqual
|
||||||
|
|
Reference in a new issue