chang fishindent to fish_indent

This commit is contained in:
cyy 2020-10-07 14:04:43 +07:00
parent 194660660d
commit a49f664aea
4 changed files with 15 additions and 15 deletions

View File

@ -1,12 +1,12 @@
" Author: Chen YuanYuan <cyyever@outlook.com>
" Description: Integration of fish_indent with ALE.
call ale#Set('fish_fishindent_executable', 'fish_indent')
call ale#Set('fish_fishindent_options', '')
call ale#Set('fish_fish_indent_executable', 'fish_indent')
call ale#Set('fish_fish_indent_options', '')
function! ale#fixers#fish_indent#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'fish_fishindent_executable')
let l:options = ale#Var(a:buffer, 'fish_fishindent_options')
let l:executable = ale#Var(a:buffer, 'fish_fish_indent_executable')
let l:options = ale#Var(a:buffer, 'fish_fish_indent_options')
let l:filename = ale#Escape(bufname(a:buffer))
return {

View File

@ -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_indent *ale-fish-fishindent*
fish_indent *ale-fish-fish_indent*
g:ale_fish_fishindent_executable *g:ale_fish_fishindent_executable*
*b:ale_fish_fishindent_executable*
g:ale_fish_fish_indent_executable *g:ale_fish_fish_indent_executable*
*b:ale_fish_fish_indent_executable*
Type: |String|
Default: `'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*
*b:ale_fish_fishindent_options*
g:ale_fish_fish_indent_options *g:ale_fish_fish_indent_options*
*b:ale_fish_fish_indent_options*
Type: |String|
Default: `''`

View File

@ -2594,7 +2594,7 @@ documented in additional help files.
eruby...................................|ale-eruby-options|
ruumba................................|ale-eruby-ruumba|
fish....................................|ale-fish-options|
fish_indent...........................|ale-fish-fishindent|
fish_indent...........................|ale-fish-fish_indent|
fortran.................................|ale-fortran-options|
gcc...................................|ale-fortran-gcc|
language_server.......................|ale-fortran-language-server|

View File

@ -1,10 +1,10 @@
Before:
Save g:ale_fish_fishindent_executable
Save g:ale_fish_fishindent_options
Save g:ale_fish_fish_indent_executable
Save g:ale_fish_fish_indent_options
" Use an invalid global executable, so we don't match it.
let g:ale_fish_fishindent_executable = 'xxxinvalid'
let g:ale_fish_fishindent_options = ''
let g:ale_fish_fish_indent_executable = 'xxxinvalid'
let g:ale_fish_fish_indent_options = ''
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(''))
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')
AssertEqual