mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-18 06:19:49 +08:00
Implement Lua ALE setup & overhaul documentation
1. Add ale.setup and ale.setup.buffer for pure Lua configuration. 2. Update many global settings to use Booleans instead of numbers to make types easiert to work with in Lua. 3. Radically reformat documentation and fix errors to make documentation more usable for Neovim users.
This commit is contained in:
+49
-24
@@ -5,23 +5,27 @@ ALE Shell Integration *ale-sh-options*
|
||||
===============================================================================
|
||||
bashate *ale-sh-bashate*
|
||||
|
||||
g:ale_sh_bashate_executable *g:ale_sh_bashate_executable*
|
||||
*ale-options.sh_bashate_executable*
|
||||
*g:ale_sh_bashate_executable*
|
||||
*b:ale_sh_bashate_executable*
|
||||
sh_bashate_executable
|
||||
g:ale_sh_bashate_executable
|
||||
Type: |String|
|
||||
Default: `'bashate'`
|
||||
|
||||
This variable sets executable used for bashate.
|
||||
|
||||
|
||||
g:ale_sh_bashate_options *g:ale_sh_bashate_options*
|
||||
*ale-options.sh_bashate_options*
|
||||
*g:ale_sh_bashate_options*
|
||||
*b:ale_sh_bashate_options*
|
||||
sh_bashate_options
|
||||
g:ale_sh_bashate_options
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
With this variable we are able to pass extra arguments for bashate. For
|
||||
example to ignore the indentation rule:
|
||||
example to ignore the indentation rule: >
|
||||
|
||||
>
|
||||
let g:ale_sh_bashate_options = '-i E003'
|
||||
<
|
||||
|
||||
@@ -34,16 +38,21 @@ See |ale-cspell-options|
|
||||
===============================================================================
|
||||
sh-language-server *ale-sh-language-server*
|
||||
|
||||
g:ale_sh_language_server_executable *g:ale_sh_language_server_executable*
|
||||
*ale-options.sh_language_server_executable*
|
||||
*g:ale_sh_language_server_executable*
|
||||
*b:ale_sh_language_server_executable*
|
||||
sh_language_server_executable
|
||||
g:ale_sh_language_server_executable
|
||||
Type: |String|
|
||||
Default: `'bash-language-server'`
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
g:ale_sh_language_server_use_global *g:ale_sh_language_server_use_global*
|
||||
*ale-options.sh_language_server_use_global*
|
||||
*g:ale_sh_language_server_use_global*
|
||||
*b:ale_sh_language_server_use_global*
|
||||
sh_language_server_use_global
|
||||
g:ale_sh_language_server_use_global
|
||||
Type: |Number|
|
||||
Default: `get(g:, 'ale_use_global_executables', 0)`
|
||||
|
||||
@@ -53,8 +62,11 @@ g:ale_sh_language_server_use_global *g:ale_sh_language_server_use_global*
|
||||
===============================================================================
|
||||
shell *ale-sh-shell*
|
||||
|
||||
g:ale_sh_shell_default_shell *g:ale_sh_shell_default_shell*
|
||||
*ale-options.sh_shell_default_shell*
|
||||
*g:ale_sh_shell_default_shell*
|
||||
*b:ale_sh_shell_default_shell*
|
||||
sh_shell_default_shell
|
||||
g:ale_sh_shell_default_shell
|
||||
Type: |String|
|
||||
Default: The current shell (`$SHELL`). Falls back to `'bash'` if that cannot be
|
||||
read or if the current shell is `'fish'`.
|
||||
@@ -68,16 +80,21 @@ g:ale_sh_shell_default_shell *g:ale_sh_shell_default_shell*
|
||||
===============================================================================
|
||||
shellcheck *ale-sh-shellcheck*
|
||||
|
||||
g:ale_sh_shellcheck_executable *g:ale_sh_shellcheck_executable*
|
||||
*ale-options.sh_shellcheck_executable*
|
||||
*g:ale_sh_shellcheck_executable*
|
||||
*b:ale_sh_shellcheck_executable*
|
||||
sh_shellcheck_executable
|
||||
g:ale_sh_shellcheck_executable
|
||||
Type: |String|
|
||||
Default: `'shellcheck'`
|
||||
|
||||
This variable sets executable used for shellcheck.
|
||||
|
||||
|
||||
g:ale_sh_shellcheck_options *g:ale_sh_shellcheck_options*
|
||||
*ale-options.sh_shellcheck_options*
|
||||
*g:ale_sh_shellcheck_options*
|
||||
*b:ale_sh_shellcheck_options*
|
||||
sh_shellcheck_options
|
||||
g:ale_sh_shellcheck_options
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
@@ -85,14 +102,15 @@ g:ale_sh_shellcheck_options *g:ale_sh_shellcheck_options*
|
||||
for shellcheck invocation.
|
||||
|
||||
For example, if we want shellcheck to follow external sources (`see SC1091`)
|
||||
we can set the variable as such:
|
||||
>
|
||||
we can set the variable as such: >
|
||||
|
||||
let g:ale_sh_shellcheck_options = '-x'
|
||||
<
|
||||
|
||||
|
||||
g:ale_sh_shellcheck_change_directory *g:ale_sh_shellcheck_change_directory*
|
||||
*ale-options.sh_shellcheck_change_directory*
|
||||
*g:ale_sh_shellcheck_change_directory*
|
||||
*b:ale_sh_shellcheck_change_directory*
|
||||
sh_shellcheck_change_directory
|
||||
g:ale_sh_shellcheck_change_directory
|
||||
Type: |Number|
|
||||
Default: `1`
|
||||
|
||||
@@ -102,9 +120,11 @@ g:ale_sh_shellcheck_change_directory *g:ale_sh_shellcheck_change_directory*
|
||||
off if you want to control the directory `shellcheck` is executed from
|
||||
yourself.
|
||||
|
||||
|
||||
g:ale_sh_shellcheck_dialect *g:ale_sh_shellcheck_dialect*
|
||||
*ale-options.sh_shellcheck_dialect*
|
||||
*g:ale_sh_shellcheck_dialect*
|
||||
*b:ale_sh_shellcheck_dialect*
|
||||
sh_shellcheck_dialect
|
||||
g:ale_sh_shellcheck_dialect
|
||||
Type: |String|
|
||||
Default: `'auto'`
|
||||
|
||||
@@ -113,9 +133,11 @@ g:ale_sh_shellcheck_dialect *g:ale_sh_shellcheck_dialect*
|
||||
line (if present) or the value of `b:is_bash`, `b:is_sh`, or `b:is_kornshell`
|
||||
(set and used by |sh.vim|).
|
||||
|
||||
|
||||
g:ale_sh_shellcheck_exclusions *g:ale_sh_shellcheck_exclusions*
|
||||
*ale-options.sh_shellcheck_exclusions*
|
||||
*g:ale_sh_shellcheck_exclusions*
|
||||
*b:ale_sh_shellcheck_exclusions*
|
||||
sh_shellcheck_exclusions
|
||||
g:ale_sh_shellcheck_exclusions
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
@@ -123,8 +145,8 @@ g:ale_sh_shellcheck_exclusions *g:ale_sh_shellcheck_exclusions*
|
||||
To exclude more than one option, separate them with commas.
|
||||
|
||||
For example, to ignore some warnings that aren't applicable to files that
|
||||
will be sourced by other scripts, use the buffer-local variant:
|
||||
>
|
||||
will be sourced by other scripts, use the buffer-local variant: >
|
||||
|
||||
autocmd BufEnter PKGBUILD,.env
|
||||
\ let b:ale_sh_shellcheck_exclusions = 'SC2034,SC2154,SC2164'
|
||||
<
|
||||
@@ -132,8 +154,11 @@ g:ale_sh_shellcheck_exclusions *g:ale_sh_shellcheck_exclusions*
|
||||
===============================================================================
|
||||
shfmt *ale-sh-shfmt*
|
||||
|
||||
g:ale_sh_shfmt_options *g:ale_sh_shfmt_options*
|
||||
*ale-options.sh_shfmt_options*
|
||||
*g:ale_sh_shfmt_options*
|
||||
*b:ale_sh_shfmt_options*
|
||||
sh_shfmt_options
|
||||
g:ale_sh_shfmt_options
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user