2016-10-10 07:53:54 -04:00
|
|
|
*ale.txt* For Vim version 8.0. Last change: 2016 October 10
|
2016-11-02 02:19:24 -04:00
|
|
|
*ale*
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2016-10-10 07:53:54 -04:00
|
|
|
ALE - Asynchronous Lint Engine
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
CONTENTS *ale-contents*
|
|
|
|
|
2017-01-15 08:20:23 -05:00
|
|
|
1. Introduction.........................|ale-introduction|
|
|
|
|
2. Supported Languages & Tools..........|ale-support|
|
|
|
|
3. Global Options.......................|ale-options|
|
|
|
|
4. Linter Specific Options..............|ale-linter-options|
|
|
|
|
4.1. eslint..........................|ale-linter-options-eslint|
|
|
|
|
4.2. flow............................|ale-linter-options-flow|
|
|
|
|
4.3. jshint..........................|ale-linter-options-jshint|
|
|
|
|
4.4. phpcs...........................|ale-linter-options-phpcs|
|
|
|
|
4.5. html-tidy.......................|ale-linter-options-html-tidy|
|
|
|
|
4.6. c-gcc...........................|ale-linter-options-c-gcc|
|
|
|
|
4.7. cpp-gcc.........................|ale-linter-options-cpp-gcc|
|
|
|
|
4.8. fortran-gcc.....................|ale-linter-options-fortran-gcc|
|
|
|
|
4.9. shell...........................|ale-linter-options-shell|
|
|
|
|
4.10. shellcheck......................|ale-linter-options-shellcheck|
|
|
|
|
4.11. vint............................|ale-linter-options-vint|
|
|
|
|
4.12. luacheck........................|ale-linter-options-luacheck|
|
|
|
|
4.13. c-cppcheck......................|ale-linter-options-c-cppcheck|
|
|
|
|
4.14. cpp-cppcheck....................|ale-linter-options-cpp-cppcheck|
|
|
|
|
4.15. htmlhint........................|ale-linter-options-htmlhint|
|
|
|
|
4.16. c-clang.........................|ale-linter-options-c-clang|
|
2017-02-09 22:53:25 -05:00
|
|
|
4.17. cpp-clang.......................|ale-linter-options-cpp-clang|
|
2017-02-11 18:45:06 -05:00
|
|
|
4.18. cpp-clangtidy...................|ale-linter-options-cpp-clangtidy|
|
|
|
|
4.19. python-flake8...................|ale-linter-options-python-flake8|
|
|
|
|
4.20. ruby-rubocop....................|ale-linter-options-ruby-rubocop|
|
|
|
|
4.21. chktex..........................|ale-linter-options-chktex|
|
|
|
|
4.22. lacheck.........................|ale-linter-options-lacheck|
|
|
|
|
4.23. stylelint.......................|ale-linter-options-stylelint|
|
|
|
|
4.24. rustc...........................|ale-linter-options-rustc|
|
|
|
|
4.25. python-mypy.....................|ale-linter-options-python-mypy|
|
|
|
|
4.26. python-pylint...................|ale-linter-options-python-pylint|
|
|
|
|
4.27. erlang..........................|ale-linter-options-erlang|
|
|
|
|
4.28. phpmd...........................|ale-linter-options-phpmd|
|
|
|
|
4.29. xo..............................|ale-linter-options-xo|
|
|
|
|
4.30. javac...........................|ale-linter-options-javac|
|
2017-02-15 03:12:24 -05:00
|
|
|
4.31. yamllint........................|ale-linter-options-yamllint|
|
2017-02-26 08:50:43 -05:00
|
|
|
4.32. cmakelint.......................|ale-linter-options-cmakelint|
|
|
|
|
4.33. perl-perl.......................|ale-linter-options-perl-perl|
|
2017-01-15 08:20:23 -05:00
|
|
|
5. Linter Integration Notes.............|ale-linter-integration|
|
|
|
|
5.1. merlin..........................|ale-linter-integration-ocaml-merlin|
|
|
|
|
5.2. rust.............................|ale-integration-rust|
|
|
|
|
6. Commands/Keybinds....................|ale-commands|
|
|
|
|
7. API..................................|ale-api|
|
|
|
|
8. Special Thanks.......................|ale-special-thanks|
|
|
|
|
9. Contact..............................|ale-contact|
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
1. Introduction *ale-introduction*
|
|
|
|
|
|
|
|
ALE provides the means to run linters asynchronously in Vim in a variety of
|
|
|
|
languages and tools. ALE sends the contents of buffers to linter programs
|
|
|
|
using the |job-control| features available in Vim 8 and NeoVim. For Vim 8,
|
|
|
|
Vim must be compiled with the |job| and |channel| and |timer| features
|
|
|
|
as a minimum.
|
|
|
|
|
|
|
|
ALE supports the following key features:
|
|
|
|
|
|
|
|
1. Running linters when text is changed.
|
|
|
|
2. Running linters when files are opened.
|
|
|
|
3. Running linters when files are saved. (When a global flag is set.)
|
|
|
|
4. Populating the |loclist| with warning and errors.
|
|
|
|
5. Setting |signs| with warnings and errors for error markers.
|
|
|
|
6. Using |echo| to show error messages when the cursor moves.
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
2. Supported Languages & Tools *ale-support*
|
|
|
|
|
|
|
|
The following languages and tools are supported.
|
|
|
|
|
2016-10-20 10:26:56 -04:00
|
|
|
* Ansible: 'ansible-lint'
|
2017-03-01 19:06:09 -05:00
|
|
|
* Asciidoc: 'proselint'
|
2016-10-05 19:22:32 -04:00
|
|
|
* Bash: 'shell' (-n flag), 'shellcheck'
|
|
|
|
* Bourne Shell: 'shell' (-n flag), 'shellcheck'
|
2016-10-31 01:32:39 -04:00
|
|
|
* C: 'cppcheck', 'gcc', 'clang'
|
2017-02-11 18:45:06 -05:00
|
|
|
* C++ (filetype cpp): 'clang', 'clangtidy', 'cppcheck', 'gcc'
|
2017-01-15 07:42:17 -05:00
|
|
|
* C#: 'mcs'
|
2016-10-30 14:23:32 -04:00
|
|
|
* Chef: 'foodcritic'
|
2017-02-25 12:27:03 -05:00
|
|
|
* CMake: 'cmakelint'
|
2016-10-08 11:52:23 -04:00
|
|
|
* CoffeeScript: 'coffee', 'coffelint'
|
2016-12-06 08:26:06 -05:00
|
|
|
* CSS: 'csslint', 'stylelint'
|
2016-10-07 13:33:16 -04:00
|
|
|
* Cython (pyrex filetype): 'cython'
|
2016-10-05 19:22:32 -04:00
|
|
|
* D: 'dmd'
|
2017-01-30 10:27:26 -05:00
|
|
|
* Dockerfile: 'hadolint'
|
2016-10-16 11:44:09 -04:00
|
|
|
* Elixir: 'credo'
|
2016-12-13 04:06:04 -05:00
|
|
|
* Elm: 'elm-make'
|
2017-01-22 08:42:18 -05:00
|
|
|
* Erlang: 'erlc'
|
2016-10-05 19:22:32 -04:00
|
|
|
* Fortran: 'gcc'
|
2016-12-22 07:10:21 -05:00
|
|
|
* Go: 'gofmt -e', 'go vet', 'golint', 'go build'
|
2017-03-03 15:27:07 -05:00
|
|
|
* Haml: 'hamllint'
|
2016-10-19 08:27:03 -04:00
|
|
|
* Haskell: 'ghc', 'hlint'
|
2017-03-01 19:06:09 -05:00
|
|
|
* HTML: 'HTMLHint', 'proselint', 'tidy'
|
2017-02-11 17:02:38 -05:00
|
|
|
* Java: 'javac'
|
2017-02-09 13:54:49 -05:00
|
|
|
* JavaScript: 'eslint', 'jscs', 'jshint', 'flow', 'xo'
|
2016-10-05 19:22:32 -04:00
|
|
|
* JSON: 'jsonlint'
|
2016-12-04 17:19:06 -05:00
|
|
|
* LaTeX: 'chktex', 'lacheck'
|
2016-10-12 10:44:53 -04:00
|
|
|
* Lua: 'luacheck'
|
2017-03-01 19:06:09 -05:00
|
|
|
* Markdown: 'mdl', 'proselint'
|
2016-10-24 15:32:52 -04:00
|
|
|
* MATLAB: 'mlint'
|
2017-03-18 12:33:26 -04:00
|
|
|
* nim: 'nim check'
|
2017-03-03 16:45:48 -05:00
|
|
|
* nix: 'nix-instantiate'
|
2017-03-01 19:06:09 -05:00
|
|
|
* nroff: 'proselint'
|
2016-11-23 10:19:36 -05:00
|
|
|
* OCaml: 'merlin' (see |ale-linter-integration-ocaml-merlin|)
|
2016-10-09 11:31:03 -04:00
|
|
|
* Perl: 'perl' (-c flag), 'perlcritic'
|
2017-02-01 11:09:33 -05:00
|
|
|
* PHP: 'hack', 'php' (-l flag), 'phpcs', 'phpmd'
|
2017-03-01 19:06:09 -05:00
|
|
|
* Pod: 'proselint'
|
2016-10-07 17:16:29 -04:00
|
|
|
* Pug: 'pug-lint'
|
2016-11-25 07:00:07 -05:00
|
|
|
* Puppet: 'puppet', 'puppet-lint'
|
2017-01-15 08:20:23 -05:00
|
|
|
* Python: 'flake8', 'mypy', 'pylint'
|
2017-03-01 19:06:09 -05:00
|
|
|
* reStructuredText: 'proselint'
|
2017-01-19 15:21:54 -05:00
|
|
|
* Rust: 'rustc' (see |ale-integration-rust|)
|
2016-10-05 19:22:32 -04:00
|
|
|
* Ruby: 'rubocop'
|
2016-12-06 08:26:06 -05:00
|
|
|
* SASS: 'sasslint', 'stylelint'
|
|
|
|
* SCSS: 'sasslint', 'scsslint', 'stylelint'
|
2016-10-07 11:28:44 -04:00
|
|
|
* Scala: 'scalac'
|
2017-03-13 19:21:59 -04:00
|
|
|
* Slim: 'slim-lint'
|
2017-02-17 21:05:33 -05:00
|
|
|
* SML: 'smlnj'
|
2016-12-13 10:28:20 -05:00
|
|
|
* Swift: 'swiftlint'
|
2016-12-22 06:32:20 -05:00
|
|
|
* Tex: 'proselint'
|
2017-03-01 19:06:09 -05:00
|
|
|
* Texinfo: 'proselint'
|
2016-12-22 06:32:20 -05:00
|
|
|
* Text: 'proselint'
|
2016-11-10 11:24:17 -05:00
|
|
|
* TypeScript: 'tslint', 'typecheck'
|
2016-10-08 08:38:31 -04:00
|
|
|
* Verilog: 'iverilog', 'verilator'
|
2016-10-05 19:22:32 -04:00
|
|
|
* Vim: 'vint'
|
2017-03-01 19:06:09 -05:00
|
|
|
* Vim help: 'proselint'
|
|
|
|
* XHTML: 'proselint'
|
2016-10-05 19:22:32 -04:00
|
|
|
* YAML: 'yamllint'
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
3. Global Options *ale-options*
|
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
g:airline#extensions#ale#enabled *g:airline#extensions#ale#enabled*
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
Enables or disables the |airline|'s native extension for ale, which displays
|
|
|
|
warnings and errors in the status line, prefixed by
|
|
|
|
|airline#extensions#ale#error_symbol| and
|
|
|
|
|airline#extensions#ale#warning_symbol|.
|
2016-10-11 18:11:45 -04:00
|
|
|
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
g:ale_echo_cursor *g:ale_echo_cursor*
|
2016-10-11 18:11:45 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
2016-10-11 18:11:45 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
When this option is set to `1`, a truncated message will be echoed when a
|
|
|
|
cursor is near a warning or error. ALE will attempt to find the warning or
|
|
|
|
error at a column nearest to the cursor when the cursor is resting on a line
|
|
|
|
which contains a warning or error. This option can be set to `0` to disable
|
|
|
|
this behaviour.
|
|
|
|
The format of the message can be customizable in |g:ale_echo_msg_format|.
|
2016-10-11 18:11:45 -04:00
|
|
|
|
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
g:ale_echo_msg_error_str *g:ale_echo_msg_error_str*
|
2016-10-11 18:11:45 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
Type: |String|
|
|
|
|
Default: `Error`
|
2016-10-11 18:11:45 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
The string used for error severity in the echoed message.
|
|
|
|
Note |`g:ale_echo_cursor`| should be set to 1
|
|
|
|
Note |`g:ale_echo_msg_format`| should contain the `%severity%` handler
|
2016-10-11 18:11:45 -04:00
|
|
|
|
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
g:ale_echo_msg_format *g:ale_echo_msg_format*
|
2016-10-11 18:11:45 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
Type: |String|
|
|
|
|
Default: `%s`
|
2016-10-11 18:11:45 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
This variable defines the format of the echoed message. The `%s` is the
|
|
|
|
error message itself, and it can contain the following handlers:
|
|
|
|
- `%linter%` for linter's name
|
|
|
|
- `%severity%` for the type of severity
|
|
|
|
Note |`g:ale_echo_cursor`| should be setted to 1
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
g:ale_echo_msg_warning_str *g:ale_echo_msg_warning_str*
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
Type: |String|
|
|
|
|
Default: `Warning`
|
|
|
|
|
|
|
|
The string used for warning severity in the echoed message.
|
|
|
|
Note |`g:ale_echo_cursor`| should be set to 1
|
|
|
|
Note |`g:ale_echo_msg_format`| should contain the `%severity%` handler
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
2017-03-06 18:15:28 -05:00
|
|
|
g:ale_emit_conflict_warnings *g:ale_emit_conflict_warnings*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
|
|
|
|
|
|
|
When set to `0`, ALE will not emit any warnings on startup about conflicting
|
|
|
|
plugins. ALE will probably not work if other linting plugins are installed.
|
|
|
|
|
|
|
|
|
2017-02-12 14:26:18 -05:00
|
|
|
g:ale_enabled *g:ale_enabled*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
|
|
|
|
|
|
|
When set to `0`, this option will completely disable ALE, such that no
|
|
|
|
error checking will be performed, etc. ALE can be toggled on and off with
|
|
|
|
the |ALEToggle| command, which changes this option.
|
|
|
|
|
|
|
|
|
2017-02-16 16:33:44 -05:00
|
|
|
g:ale_history_enabled *g:ale_history_enabled*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
|
|
|
|
|
|
|
When set to `1`, ALE will remember the last few commands which were run
|
|
|
|
for every buffer which is open. This information can be viewed with the
|
|
|
|
|ALEInfo| command. The size of the buffer can be controlled with the
|
|
|
|
|g:ale_max_buffer_history_size| option.
|
|
|
|
|
|
|
|
This option can be disabled if storing a command history is not desired.
|
|
|
|
|
|
|
|
|
2017-02-16 18:18:57 -05:00
|
|
|
g:ale_history_log_output *g:ale_history_log_output*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
When set to `1`, ALE will store the output of commands which have completed
|
|
|
|
successfully in the command history, and the output will be displayed when
|
|
|
|
using |ALEInfo|.
|
|
|
|
|
|
|
|
|g:ale_history_enabled| must be set to `1` for this output to be stored or
|
|
|
|
printed.
|
|
|
|
|
|
|
|
ALE will likely consume a lot of memory if this option is on, so it should
|
|
|
|
only be used for debugging problems with linters.
|
|
|
|
|
|
|
|
|
2017-01-22 10:19:09 -05:00
|
|
|
g:ale_keep_list_window_open *g:ale_keep_list_window_open*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
When set to `1`, this option will keep the loclist or quickfix windows
|
|
|
|
event after all warnings/errors have been removed for files. By default
|
|
|
|
the loclist or quicfix windows will be closed automatically when there
|
|
|
|
are no warnings or errors.
|
|
|
|
|
|
|
|
See: |g:ale_open_list|
|
|
|
|
|
|
|
|
|
2016-10-05 19:22:32 -04:00
|
|
|
g:ale_lint_delay *g:ale_lint_delay*
|
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |Number|
|
|
|
|
Default: `200`
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
This variable controls the milliseconds delay after which the linters will
|
|
|
|
be run after text is changed. This option is only meaningful with the
|
|
|
|
|g:ale_lint_on_text_changed| variable set to `1`.
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
g:ale_lint_on_enter *g:ale_lint_on_enter*
|
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
When this option is set to `1`, the |BufEnter| and |BufRead| events will be
|
|
|
|
used to apply linters when buffers are first opened. If this is not desired,
|
|
|
|
this variable can be set to `0` in your vimrc file to disable this
|
|
|
|
behaviour.
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
g:ale_lint_on_save *g:ale_lint_on_save*
|
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |Number|
|
|
|
|
Default: `0`
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
This option will make ALE run the linters whenever a file is saved when it
|
|
|
|
it set to `1` in your vimrc file. This option can be used in combination
|
|
|
|
with the |g:ale_lint_on_enter| and |g:ale_lint_on_text_changed| options to
|
|
|
|
make ALE only check files after that have been saved, if that is what is
|
|
|
|
desired.
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
g:ale_lint_on_text_changed *g:ale_lint_on_text_changed*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
|
|
|
|
|
|
|
By default, ALE will check files with the various supported programs when
|
|
|
|
text is changed by using the |TextChanged| event. If this behaviour is not
|
|
|
|
desired, then this option can be disabled by setting it to 0. The
|
|
|
|
|g:ale_lint_delay| variable will be used to set a |timer_start()| on a
|
|
|
|
delay, and each change to a file will continue to call |timer_stop()| and
|
|
|
|
|timer_start()| repeatedly until the timer ticks by, and the linters will be
|
|
|
|
run. The checking of files will run in the background, so it should not
|
|
|
|
inhibit editing files.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_linter_aliases *g:ale_linter_aliases*
|
|
|
|
|
|
|
|
Type: |Dictionary|
|
|
|
|
Default: `{}`
|
|
|
|
|
|
|
|
The |g:ale_linter_aliases| option can be used to set aliases from one
|
|
|
|
filetype to another. A given filetype can be mapped to use the linters
|
|
|
|
run for another given filetype.
|
|
|
|
|
|
|
|
This |Dictionary| will be merged with a default dictionary containing the
|
|
|
|
following values: >
|
|
|
|
|
|
|
|
{
|
|
|
|
\ 'zsh': 'sh',
|
|
|
|
\ 'csh': 'sh',
|
|
|
|
\}
|
|
|
|
<
|
|
|
|
For example, if you wish to map a new filetype `'foobar'` to run the `'php'`
|
|
|
|
linters, you could set the following: >
|
|
|
|
|
|
|
|
let g:ale_linter_aliases = {'foobar': 'php'}
|
|
|
|
<
|
|
|
|
When combined with the |g:ale_linters| option, the original filetype
|
|
|
|
(`'foobar'`) will be used for determining which linters to run,
|
|
|
|
not the aliased type (`'php'`). This allows an aliased type to run a
|
|
|
|
different set of linters from the type it is being mapped to.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_linters *g:ale_linters*
|
|
|
|
|
|
|
|
Type: |Dictionary|
|
|
|
|
Default: `{}`
|
|
|
|
|
|
|
|
The |g:ale_linters| option sets a |Dictionary| mapping a filetype
|
|
|
|
to a |List| of linter programs to be run when checking particular filetypes.
|
|
|
|
Only the filetypes specified in the dictionary will be limited in terms
|
|
|
|
of which linters will be run.
|
|
|
|
|
|
|
|
This |Dictionary| will be merged with a default dictionary containing the
|
|
|
|
following values: >
|
|
|
|
|
|
|
|
{
|
|
|
|
\ 'csh': ['shell'],
|
2017-02-15 17:59:26 -05:00
|
|
|
\ 'rust': ['cargo'],
|
|
|
|
\ 'text': [],
|
|
|
|
\ 'zsh': ['shell'],
|
2017-01-22 10:06:33 -05:00
|
|
|
\}
|
|
|
|
<
|
|
|
|
This option can be used to enable only a particular set of linters for a
|
|
|
|
file. For example, you can enable only 'eslint' for JavaScript files: >
|
|
|
|
|
|
|
|
let g:ale_linters = {'javascript': ['eslint']}
|
|
|
|
<
|
|
|
|
If you want to disable all linters for a particular filetype, you can pass
|
|
|
|
an empty list of linters as the value: >
|
|
|
|
|
|
|
|
let g:ale_linters = {'javascript': []}
|
|
|
|
<
|
|
|
|
All linters available for a given filetype can be enabled by using the
|
|
|
|
string `'all'`: >
|
|
|
|
|
|
|
|
let g:ale_linters = {'c': 'all'}
|
|
|
|
<
|
|
|
|
|
2017-02-16 16:33:44 -05:00
|
|
|
g:ale_max_buffer_history_size *g:ale_max_buffer_history_size*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `20`
|
|
|
|
|
|
|
|
This setting controls the maximum number of commands which will be stored in
|
|
|
|
the command history used for |ALEInfo|. Command history will be rotated in
|
|
|
|
a FIFO manner. If set to a number <= 0, then the history will be
|
|
|
|
continuously set to an empty |List|.
|
|
|
|
|
|
|
|
History can be disabled completely with |g:ale_history_enabled|.
|
|
|
|
|
|
|
|
|
2017-01-22 10:19:09 -05:00
|
|
|
g:ale_open_list *g:ale_open_list*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
When set to `1`, this will cause ALE to automatically open a window for
|
|
|
|
the loclist (|lopen|) or for the quickfix list instead if
|
|
|
|
|g:ale_set_quickfix| is `1`. (|copen|)
|
|
|
|
|
|
|
|
The window will be kept open until all warnings or errors are cleared,
|
|
|
|
including those not set by ALE, unless |g:ale_keep_list_window_open| is set
|
|
|
|
to `1`, in which case the window will be kept open until closed manually.
|
|
|
|
|
|
|
|
|
2017-02-12 19:18:51 -05:00
|
|
|
g:ale_set_highlights *g:ale_set_highlights*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `has('syntax')`
|
|
|
|
|
|
|
|
When this option is set to `1`, highlights will be set in for erros and
|
|
|
|
warnings. The `ALEError` and `ALEWarning` highlight groups will be used to
|
|
|
|
provide highlights, and default to linking to `SpellBad` and `SpellCap`
|
|
|
|
respectively by default.
|
|
|
|
|
|
|
|
|
2016-10-05 19:22:32 -04:00
|
|
|
g:ale_set_loclist *g:ale_set_loclist*
|
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2017-01-22 10:19:09 -05:00
|
|
|
When this option is set to `1`, the |loclist| will be populated with any
|
2016-10-09 16:20:21 -04:00
|
|
|
warnings and errors which are found by ALE. This feature can be used to
|
|
|
|
implement jumping between errors through typical use of |lnext| and |lprev|.
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
2017-01-22 10:19:09 -05:00
|
|
|
g:ale_set_quickfix *g:ale_set_quickfix*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
When this option is set to `1`, the |quickfix| list will be populated with any
|
|
|
|
warnings and errors which are found by ALE, instead of the |loclist|. The
|
|
|
|
loclist will never be populated when this option is on.
|
|
|
|
|
|
|
|
|
2016-10-05 19:22:32 -04:00
|
|
|
g:ale_set_signs *g:ale_set_signs*
|
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |Number|
|
|
|
|
Default: `has('signs')`
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
When this option is set to `1`, the |sign| column will be populated with
|
|
|
|
signs marking where errors and warnings appear in the file. The
|
2016-10-10 07:53:54 -04:00
|
|
|
`ALEErrorSign` and `ALEWarningSign` highlight groups will be used to provide
|
2016-10-09 16:20:21 -04:00
|
|
|
highlighting for the signs. The text used for signs can be customised with
|
|
|
|
the |g:ale_sign_error| and |g:ale_sign_warning| options.
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
g:ale_sign_column_always *g:ale_sign_column_always*
|
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |Number|
|
|
|
|
Default: `0`
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
By default, the sign gutter will disappear when all warnings and errors have
|
|
|
|
been fixed for a file. When this option is set to `1`, the sign column will
|
|
|
|
remain open. This can be preferable if you don't want the text in your file
|
|
|
|
to move around as you edit a file.
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
g:ale_sign_error *g:ale_sign_error*
|
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `'>>'`
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
This string can be changed to change the characters used for the sign gutter
|
|
|
|
for lines which at least one error on them. Lines with both errors and
|
|
|
|
warnings on them will show the error marker, as errors take precedence.
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
g:ale_sign_offset *g:ale_sign_offset*
|
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |Number|
|
|
|
|
Default: `1000000`
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
This variable controls offset from which numeric IDs will be generated for
|
|
|
|
new signs. Signs cannot share the same ID values, so when two Vim plugins
|
|
|
|
set signs at the same time, the IDs have to be configured such that they do
|
|
|
|
not conflict with one another. If the IDs used by ALE are found to conflict
|
|
|
|
with some other plugin, this offset value can be changed, and hopefully both
|
|
|
|
plugins will work together. See |sign-place| for more information on how
|
|
|
|
signs are set.
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
g:ale_sign_warning *g:ale_sign_warning*
|
2016-10-10 07:53:54 -04:00
|
|
|
|
|
|
|
Type: |String|
|
2017-01-22 10:06:33 -05:00
|
|
|
Default: `'--'`
|
2016-10-10 07:53:54 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
This string can be changed to change the characters used for the sign gutter
|
|
|
|
for lines which at least one warning on them.
|
2016-10-10 07:53:54 -04:00
|
|
|
|
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
g:ale_statusline_format *g:ale_statusline_format*
|
2016-10-10 07:53:54 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
Type: |List|
|
|
|
|
Default: `['%d error(s)', '%d warning(s)', 'OK']`
|
2016-10-10 07:53:54 -04:00
|
|
|
|
2017-01-22 10:06:33 -05:00
|
|
|
This variable defines the format of |`ale#statusline#status()`| output.
|
|
|
|
- The 1st element is for errors
|
|
|
|
- The 2nd element is for warnings
|
|
|
|
- The 3rd element is for when no errors are detected
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
g:ale_warn_about_trailing_whitespace *g:ale_warn_about_trailing_whitespace*
|
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
When this option is set to `1`, warnings relating to trailing whitespace on
|
|
|
|
lines will be shown in signs, the loclist, and echo messages, etc. If these
|
|
|
|
errors are found to be too irritating while edits are being made, and you
|
|
|
|
have configured Vim to automatically remove trailing whitespace, then you
|
|
|
|
can disable these warnings for some linters by setting this option to `0`.
|
|
|
|
|
|
|
|
Not all linters may respect this option. If a linter does not, please file a
|
|
|
|
bug report, and it may be possible to add such support.
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
2016-10-06 08:42:52 -04:00
|
|
|
4. Linter Specific Options *ale-linter-options*
|
|
|
|
|
|
|
|
Some linters have specific options which can be configured for each of them,
|
|
|
|
for customising their behaviour.
|
|
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
2016-10-07 11:27:27 -04:00
|
|
|
4.1. eslint *ale-linter-options-eslint*
|
2016-10-06 08:42:52 -04:00
|
|
|
|
|
|
|
g:ale_javascript_eslint_executable *g:ale_javascript_eslint_executable*
|
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `'eslint'`
|
2016-10-06 08:42:52 -04:00
|
|
|
|
2016-10-23 08:04:41 -04:00
|
|
|
ALE will first discover the eslint path in an ancestor node_modules
|
|
|
|
directory. If no such path exists, this variable will be used instead.
|
|
|
|
|
|
|
|
This variable can be set to change the path to eslint. If you have eslint_d
|
|
|
|
installed, you can set this option to use eslint_d instead.
|
|
|
|
|
|
|
|
If you wish to use only a globally installed version of eslint, set
|
|
|
|
|g:ale_javascript_eslint_use_global| to `1`.
|
|
|
|
|
|
|
|
|
2017-01-05 03:12:36 -05:00
|
|
|
g:ale_javascript_eslint_options *g:ale_javascript_eslint_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to pass additional options to eslint.
|
|
|
|
|
|
|
|
|
2016-10-23 08:04:41 -04:00
|
|
|
g:ale_javascript_eslint_use_global *g:ale_javascript_eslint_use_global*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
This variable controls whether or not ALE will search for a local path for
|
|
|
|
eslint first. If this variable is set to `1`, then ALE will always use the
|
|
|
|
global version of eslint, in preference to locally installed versions of
|
|
|
|
eslint in node_modules.
|
2016-10-09 16:20:21 -04:00
|
|
|
|
2016-11-01 05:00:08 -04:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
4.2. flow *ale-linter-options-flow*
|
|
|
|
|
|
|
|
g:ale_javascript_flow_executable *g:ale_javascript_flow_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'flow'`
|
|
|
|
|
|
|
|
ALE will first discover the flow path in an ancestor node_modules
|
|
|
|
directory. If no such path exists, this variable will be used instead.
|
|
|
|
|
|
|
|
If you wish to use only a globally installed version of flow, set
|
|
|
|
|g:ale_javascript_flow_use_global| to `1`.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_javascript_flow_use_global *g:ale_javascript_flow_use_global*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
This variable controls whether or not ALE will search for a local path for
|
|
|
|
flow first. If this variable is set to `1`, then ALE will always use the
|
|
|
|
global version of flow, in preference to locally installed versions of
|
|
|
|
flow in node_modules.
|
2016-10-06 08:42:52 -04:00
|
|
|
|
2016-10-06 20:03:19 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-01 05:00:08 -04:00
|
|
|
4.3. jshint *ale-linter-options-jshint*
|
2016-10-10 18:48:41 -04:00
|
|
|
|
|
|
|
g:ale_javascript_jshint_executable *g:ale_javascript_jshint_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'jshint'`
|
|
|
|
|
2016-10-23 08:25:50 -04:00
|
|
|
ALE will first discover the jshint path in an ancestor node_modules
|
|
|
|
directory. If no such path exists, this variable will be used instead.
|
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
This variable can be changed to change the path to jshint.
|
|
|
|
|
2016-10-23 08:25:50 -04:00
|
|
|
If you wish to use only a globally installed version of jshint, set
|
|
|
|
|g:ale_javascript_jshint_use_global| to `1`.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_javascript_jshint_use_global *g:ale_javascript_jshint_use_global*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
This variable controls whether or not ALE will search for a local path for
|
|
|
|
jshint first. If this variable is set to `1`, then ALE will always use the
|
|
|
|
global version of jshint, in preference to locally installed versions of
|
|
|
|
jshint in node_modules.
|
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-01 05:00:08 -04:00
|
|
|
4.4. phpcs *ale-linter-options-phpcs*
|
2016-10-06 20:03:19 -04:00
|
|
|
|
|
|
|
g:ale_php_phpcs_standard *g:ale_php_phpcs_standard*
|
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
2016-10-06 20:03:19 -04:00
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
This variable can be set to specify the coding standard used by phpcs. If no
|
|
|
|
coding standard is specified, phpcs will default to checking against the
|
|
|
|
PEAR coding standard, or the standard you have set as the default.
|
|
|
|
|
2016-10-07 11:27:27 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-01 05:00:08 -04:00
|
|
|
4.5. html-tidy *ale-linter-options-html-tidy*
|
2016-10-07 11:27:27 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
g:ale_html_tidy_executable *g:ale_html_tidy_executable*
|
2016-10-07 11:27:27 -04:00
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |String|
|
2016-10-10 18:48:41 -04:00
|
|
|
Default: `'tidy'`
|
2016-10-09 16:20:21 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
This variable can be changed to change the path to tidy.
|
2016-10-07 11:27:27 -04:00
|
|
|
|
2016-10-08 07:42:36 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
g:ale_html_tidy_args *g:ale_html_tidy_args*
|
2016-10-08 07:42:36 -04:00
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |String|
|
2016-10-10 18:48:41 -04:00
|
|
|
Default: `'-q -e -language en'`
|
2016-10-08 07:42:36 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
This variable can be changed to change the arguments provided to the
|
|
|
|
executable.
|
|
|
|
|
|
|
|
ALE will attempt to automatically detect the appropriate file encoding to
|
|
|
|
provide to html-tidy, and fall back to UTF-8 when encoding detection fails.
|
|
|
|
|
|
|
|
The recognized file encodings are as follows: ascii, big5, cp1252 (win1252),
|
|
|
|
cp850 (ibm858), cp932 (shiftjis), iso-2022-jp (iso-2022), latin1, macroman
|
|
|
|
(mac), sjis (shiftjis), utf-16le, utf-16, utf-8
|
2016-10-09 16:20:21 -04:00
|
|
|
|
2016-10-09 15:45:51 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-01 05:00:08 -04:00
|
|
|
4.6. c-gcc *ale-linter-options-c-gcc*
|
2016-10-09 15:45:51 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
g:ale_c_gcc_options *g:ale_c_gcc_options*
|
2016-10-09 15:45:51 -04:00
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |String|
|
2016-10-21 10:02:20 -04:00
|
|
|
Default: `'-std=c11 -Wall'`
|
2016-10-09 15:45:51 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
This variable can be change to modify flags given to gcc.
|
2016-10-09 16:20:21 -04:00
|
|
|
|
2016-10-09 16:13:33 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-01 05:00:08 -04:00
|
|
|
4.7. cpp-gcc *ale-linter-options-cpp-gcc*
|
2016-10-09 16:13:33 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
g:ale_cpp_gcc_options *g:ale_cpp_gcc_options*
|
2016-10-09 16:13:33 -04:00
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |String|
|
2016-10-21 10:02:20 -04:00
|
|
|
Default: `'-std=c++14 -Wall'`
|
2016-10-09 16:13:33 -04:00
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
This variable can be changed to modify flags given to gcc.
|
|
|
|
|
2016-10-09 16:13:33 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-01 05:00:08 -04:00
|
|
|
4.8. fortran-gcc *ale-linter-options-fortran-gcc*
|
2016-10-09 16:13:33 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
g:ale_fortran_gcc_options *g:ale_fortran_gcc_options*
|
2016-10-09 16:13:33 -04:00
|
|
|
|
2016-10-09 16:23:34 -04:00
|
|
|
Type: |String|
|
2016-10-10 18:48:41 -04:00
|
|
|
Default: `'-Wall'`
|
2016-10-09 16:13:33 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
This variable can be changed to modify flags given to gcc.
|
2016-10-09 16:13:33 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-01 05:00:08 -04:00
|
|
|
4.9. shell *ale-linter-options-shell*
|
2016-10-09 16:13:33 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
g:ale_linters_sh_shell_default_shell *g:ale_linters_sh_shell_default_shell*
|
2016-10-09 16:20:21 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: The current shell (`$SHELL`) or `'bash'` if that cannot be read.
|
2016-10-09 16:13:33 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
When ALE runs the linter for shells with the `-n` flag, it will attempt to
|
|
|
|
read the shell from the shebang (`#!`) line from the shell script to
|
|
|
|
determine the shell program to run. When this detection fails, this variable
|
|
|
|
will be used instead.
|
2016-10-09 16:13:33 -04:00
|
|
|
|
2016-10-10 14:07:01 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-03 06:17:25 -04:00
|
|
|
4.10. shellcheck *ale-linter-options-shellcheck*
|
2016-10-10 14:07:01 -04:00
|
|
|
|
2016-10-10 18:48:41 -04:00
|
|
|
g:ale_linters_sh_shellckeck_exclusions *g:ale_linters_sh_shellckeck_exclusions*
|
2016-10-10 14:07:01 -04:00
|
|
|
|
|
|
|
Type: |String|
|
2016-10-10 18:48:41 -04:00
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
Set this variable to exclude test(s) for shellcheck (-e/--exclude option).
|
2016-10-10 14:07:01 -04:00
|
|
|
|
2016-10-11 08:20:56 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-01 05:00:08 -04:00
|
|
|
4.11. vint *ale-linter-options-vint*
|
2016-10-11 08:20:56 -04:00
|
|
|
|
|
|
|
g:ale_vim_vint_show_style_issues *g:ale_vim_vint_show_style_issues*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
|
|
|
|
|
|
|
This variable will enable/disable style issues for Vint. When this option
|
|
|
|
is disabled, only warnings and errors which are not purely style issues
|
|
|
|
will be reported.
|
|
|
|
|
2016-10-12 10:44:53 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-01 05:00:08 -04:00
|
|
|
4.12. luacheck *ale-linter-options-luacheck*
|
2016-10-12 10:44:53 -04:00
|
|
|
|
|
|
|
g:ale_lua_luacheck_executable *g:ale_lua_luacheck_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'luacheck'`
|
|
|
|
|
|
|
|
This variable can be changed to change the path to luacheck.
|
|
|
|
|
2016-10-20 07:30:45 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-03 06:17:25 -04:00
|
|
|
4.13. c-cppcheck *ale-linter-options-c-cppcheck*
|
2016-10-20 07:30:45 -04:00
|
|
|
|
2016-11-03 06:17:25 -04:00
|
|
|
g:ale_c_cppcheck_options *g:ale_c_cppcheck_options*
|
2016-10-20 07:30:45 -04:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'--enable=style'`
|
|
|
|
|
|
|
|
This variable can be changed to modify flags given to cppcheck.
|
|
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
2016-11-03 06:17:25 -04:00
|
|
|
4.14. cpp-cppcheck *ale-linter-options-cpp-cppcheck*
|
2016-10-20 07:30:45 -04:00
|
|
|
|
2016-11-03 06:17:25 -04:00
|
|
|
g:ale_cpp_cppcheck_options *g:ale_cpp_cppcheck_options*
|
2016-10-20 07:30:45 -04:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'--enable=style'`
|
|
|
|
|
|
|
|
This variable can be changed to modify flags given to cppcheck.
|
|
|
|
|
2016-10-27 11:31:49 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-03 06:17:25 -04:00
|
|
|
4.15. htmlhint *ale-linter-options-htmlhint*
|
2016-10-27 11:31:49 -04:00
|
|
|
|
2016-11-03 06:17:25 -04:00
|
|
|
g:ale_html_htmlhint_options *g:ale_html_htmlhint_options*
|
2016-10-27 11:31:49 -04:00
|
|
|
|
|
|
|
Type: |String|
|
2016-10-30 05:21:34 -04:00
|
|
|
Default: `'--format=unix'`
|
2016-10-27 11:31:49 -04:00
|
|
|
|
|
|
|
This variable can be changed to modify flags given to HTMLHint.
|
|
|
|
|
2017-01-15 08:20:23 -05:00
|
|
|
|
2017-02-11 18:45:06 -05:00
|
|
|
g:ale_html_htmlhint_executable *g:ale_html_htmlhint_executable*
|
2016-12-22 06:39:01 -05:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'htmlhint'`
|
|
|
|
|
|
|
|
ALE will first discover the htmlhint path in an ancestor node_modules
|
|
|
|
directory. If no such path exists, this variable will be used instead.
|
|
|
|
|
|
|
|
If you wish to use only a globally installed version of htmlhint, set
|
|
|
|
|g:ale_html_htmlhint_use_global| to `1`.
|
|
|
|
|
|
|
|
|
2017-02-11 18:45:06 -05:00
|
|
|
g:ale_html_htmlhint_use_global *g:ale_html_htmlhint_use_global*
|
2016-12-22 06:39:01 -05:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
This variable controls whether or not ALE will search for a local path for
|
|
|
|
htmlhint first. If this variable is set to `1`, then ALE will always use the
|
|
|
|
global version of htmlhint, in preference to locally installed versions of
|
|
|
|
htmlhint in node_modules.
|
2016-10-27 11:31:49 -04:00
|
|
|
|
2016-10-31 01:32:39 -04:00
|
|
|
-------------------------------------------------------------------------------
|
2016-11-03 06:17:25 -04:00
|
|
|
4.16. c-clang *ale-linter-options-c-clang*
|
2016-10-31 01:32:39 -04:00
|
|
|
|
2016-11-03 06:17:25 -04:00
|
|
|
g:ale_c_clang_options *g:ale_c_clang_options*
|
2016-10-31 01:32:39 -04:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'-std=c11 -Wall'`
|
|
|
|
|
|
|
|
This variable can be change to modify flags given to clang.
|
|
|
|
|
2016-11-14 12:52:31 -05:00
|
|
|
-------------------------------------------------------------------------------
|
2017-02-09 22:53:25 -05:00
|
|
|
4.17. cpp-clang *ale-linter-options-cpp-clang*
|
|
|
|
|
|
|
|
g:ale_cpp_clang_options *g:ale_cpp_clang_options*
|
|
|
|
|
|
|
|
Type: |String|
|
2017-02-28 12:42:35 -05:00
|
|
|
Default: `'-std=c++14 -Wall'`
|
2017-02-09 22:53:25 -05:00
|
|
|
|
2017-02-11 18:45:06 -05:00
|
|
|
This variable can be changed to modify flags given to clang.
|
|
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
4.18. cpp-clangtidy *ale-linter-options-cpp-clangtidy*
|
|
|
|
|
|
|
|
g:ale_cpp_clangtidy_options *g:ale_cpp_clangtidy_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'-std=c++14 -Wall'`
|
|
|
|
|
|
|
|
This variable can be changed to modify flags given to clangtidy.
|
2017-02-09 22:53:25 -05:00
|
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.19. python-flake8 *ale-linter-options-python-flake8*
|
2016-11-14 12:52:31 -05:00
|
|
|
|
|
|
|
g:ale_python_flake8_executable *g:ale_python_flake8_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'flake8'`
|
|
|
|
|
|
|
|
This variable can be changed to modify the executable used for flake8.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_flake8_args *g:ale_python_flake8_args*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the flake8
|
|
|
|
invocation.
|
|
|
|
|
2017-01-15 08:20:23 -05:00
|
|
|
For example, to dynamically switch between programs targeting Python 2 and
|
|
|
|
Python 3, you may want to set >
|
2016-11-14 12:52:31 -05:00
|
|
|
|
|
|
|
let g:ale_python_flake8_executable = 'python3' " or 'python' for Python 2
|
|
|
|
let g:ale_python_flake8_args = '-m flake8'
|
2017-01-15 08:20:23 -05:00
|
|
|
<
|
|
|
|
after making sure it's installed for the appropriate Python versions (e.g.
|
|
|
|
`python3 -m pip install --user flake8`).
|
2016-11-14 12:52:31 -05:00
|
|
|
|
2016-12-01 12:28:27 -05:00
|
|
|
-------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.20. ruby-rubocop *ale-linter-options-ruby-rubocop*
|
2016-12-01 12:28:27 -05:00
|
|
|
|
|
|
|
g:ale_ruby_rubocop_options *g:ale_ruby_rubocop_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be change to modify flags given to rubocop.
|
|
|
|
|
2016-12-04 17:19:06 -05:00
|
|
|
-------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.21. chktex *ale-linter-options-chktex*
|
2016-12-04 17:19:06 -05:00
|
|
|
|
|
|
|
g:ale_tex_chktex_executable *g:ale_tex_chktex_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'chktex'`
|
|
|
|
|
|
|
|
This variable can be changed to change the path to chktex.
|
|
|
|
|
2017-01-15 08:20:23 -05:00
|
|
|
|
2016-12-04 17:19:06 -05:00
|
|
|
g:ale_tex_chktex_options *g:ale_tex_chktex_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'-I'`
|
|
|
|
|
|
|
|
This variable can be changed to modify flags given to chktex.
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.22. lacheck *ale-linter-options-lacheck*
|
2016-12-04 17:19:06 -05:00
|
|
|
|
2017-02-11 18:45:06 -05:00
|
|
|
g:ale_lacheck_executable *g:ale_lacheck_executable*
|
2016-12-04 17:19:06 -05:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: '`lacheck`'
|
|
|
|
|
|
|
|
This variable can be changed to change the path to lacheck.
|
|
|
|
|
2016-12-22 06:39:01 -05:00
|
|
|
-------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.23. stylelint *ale-linter-options-stylelint*
|
2016-12-22 06:39:01 -05:00
|
|
|
|
2017-02-11 18:45:06 -05:00
|
|
|
g:ale_css_stylelint_executable *g:ale_css_stylelint_executable*
|
2016-12-22 06:39:01 -05:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'stylelint'`
|
|
|
|
|
|
|
|
ALE will first discover the stylelint path in an ancestor node_modules
|
|
|
|
directory. If no such path exists, this variable will be used instead.
|
|
|
|
|
|
|
|
If you wish to use only a globally installed version of stylelint, set
|
|
|
|
|g:ale_css_stylelint_use_global| to `1`.
|
|
|
|
|
2017-02-12 01:25:40 -05:00
|
|
|
g:ale_css_stylelint_options *g:ale_css_stylelint_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to pass additional options to stylelint.
|
2016-12-22 06:39:01 -05:00
|
|
|
|
2017-02-11 18:45:06 -05:00
|
|
|
g:ale_css_stylelint_use_global *g:ale_css_stylelint_use_global*
|
2016-12-22 06:39:01 -05:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
This variable controls whether or not ALE will search for a local path for
|
|
|
|
stylelint first. If this variable is set to `1`, then ALE will always use the
|
|
|
|
global version of stylelint, in preference to locally installed versions of
|
|
|
|
stylelint in node_modules.
|
|
|
|
|
2017-01-15 08:20:23 -05:00
|
|
|
|
2017-02-11 18:45:06 -05:00
|
|
|
g:ale_sass_stylelint_executable *g:ale_sass_stylelint_executable*
|
2016-12-22 06:39:01 -05:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'stylelint'`
|
|
|
|
|
|
|
|
ALE will first discover the stylelint path in an ancestor node_modules
|
|
|
|
directory. If no such path exists, this variable will be used instead.
|
|
|
|
|
|
|
|
If you wish to use only a globally installed version of stylelint, set
|
2016-12-26 11:35:22 -05:00
|
|
|
|g:ale_sass_stylelint_use_global| to `1`.
|
2016-12-22 06:39:01 -05:00
|
|
|
|
|
|
|
|
2017-02-11 18:45:06 -05:00
|
|
|
g:ale_sass_stylelint_use_global *g:ale_sass_stylelint_use_global*
|
2016-12-22 06:39:01 -05:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
This variable controls whether or not ALE will search for a local path for
|
|
|
|
stylelint first. If this variable is set to `1`, then ALE will always use the
|
|
|
|
global version of stylelint, in preference to locally installed versions of
|
|
|
|
stylelint in node_modules.
|
|
|
|
|
2017-01-15 08:20:23 -05:00
|
|
|
|
2017-02-11 18:45:06 -05:00
|
|
|
g:ale_scss_stylelint_executable *g:ale_scss_stylelint_executable*
|
2016-12-22 06:39:01 -05:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'stylelint'`
|
|
|
|
|
|
|
|
ALE will first discover the stylelint path in an ancestor node_modules
|
|
|
|
directory. If no such path exists, this variable will be used instead.
|
|
|
|
|
|
|
|
If you wish to use only a globally installed version of stylelint, set
|
|
|
|
|g:ale_scss_stylelint_use_global| to `1`.
|
|
|
|
|
|
|
|
|
2017-02-11 18:45:06 -05:00
|
|
|
g:ale_scss_stylelint_use_global *g:ale_scss_stylelint_use_global*
|
2016-12-22 06:39:01 -05:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
This variable controls whether or not ALE will search for a local path for
|
|
|
|
stylelint first. If this variable is set to `1`, then ALE will always use the
|
|
|
|
global version of stylelint, in preference to locally installed versions of
|
|
|
|
stylelint in node_modules.
|
|
|
|
|
2017-01-12 04:33:55 -05:00
|
|
|
------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.24. rustc *ale-linter-options-rustc*
|
2017-01-12 04:33:55 -05:00
|
|
|
|
|
|
|
g:ale_rust_ignore_error_codes *g:ale_rust_ignore_error_codes*
|
|
|
|
|
|
|
|
Type: |List| of |String|s
|
|
|
|
Default: []
|
|
|
|
|
|
|
|
This variable can contain error codes which will be ignored. For example, to
|
|
|
|
ignore most errors regarding failed imports, put this in your .vimrc
|
|
|
|
>
|
|
|
|
let g:ale_rust_ignore_error_codes = ['E0432', 'E0433']
|
|
|
|
|
2017-01-15 08:20:23 -05:00
|
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.25. python-mypy *ale-linter-options-python-mypy*
|
2017-01-15 08:20:23 -05:00
|
|
|
|
|
|
|
g:ale_python_mypy_options *g:ale_python_mypy_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the mypy
|
|
|
|
invocation.
|
|
|
|
|
|
|
|
|
2017-01-13 05:04:29 -05:00
|
|
|
-------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.26. python-pylint *ale-linter-options-python-pylint*
|
2017-01-13 05:04:29 -05:00
|
|
|
|
|
|
|
g:ale_python_pylint_executable *g:ale_python_pylint_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'pylint'`
|
|
|
|
|
|
|
|
This variable can be changed to modify the executable used for pylint.
|
|
|
|
|
|
|
|
|
2017-01-15 08:05:07 -05:00
|
|
|
g:ale_python_pylint_options *g:ale_python_pylint_options*
|
2017-01-13 05:04:29 -05:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the pylint
|
|
|
|
invocation.
|
|
|
|
|
2017-01-15 08:20:23 -05:00
|
|
|
For example, to dynamically switch between programs targeting Python 2 and
|
|
|
|
Python 3, you may want to set >
|
2017-01-13 05:04:29 -05:00
|
|
|
|
|
|
|
let g:ale_python_pylint_executable = 'python3' " or 'python' for Python 2
|
2017-01-15 08:05:07 -05:00
|
|
|
let g:ale_python_pylint_options = '-rcfile /path/to/pylint.rc'
|
2017-01-13 05:04:29 -05:00
|
|
|
|
2017-01-15 08:20:23 -05:00
|
|
|
after making sure it's installed for the appropriate Python versions (e.g.
|
|
|
|
`python3 -m pip install --user pylint`).
|
2017-01-13 05:04:29 -05:00
|
|
|
|
2017-01-22 08:42:18 -05:00
|
|
|
------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.27. erlang *ale-linter-options-erlang*
|
2017-01-22 08:42:18 -05:00
|
|
|
|
2017-01-22 08:51:57 -05:00
|
|
|
g:ale_erlang_erlc_options *g:ale_erlang_erlc_options*
|
2017-01-22 08:42:18 -05:00
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: '`''`'
|
|
|
|
|
|
|
|
This variable controls additional parameters passed to `erlc`, such as `-I`
|
|
|
|
or `-pa`.
|
|
|
|
|
2017-02-01 11:09:33 -05:00
|
|
|
------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.28. phpmd *ale-linter-options-phpmd*
|
2017-02-01 11:09:33 -05:00
|
|
|
|
|
|
|
g:ale_php_phpmd_ruleset *g:ale_php_phpmd_ruleset*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: 'cleancode,codesize,controversial,design,naming,unusedcode'
|
|
|
|
|
2017-03-01 19:06:09 -05:00
|
|
|
This variable controls the ruleset used by phpmd. Default is to use all of
|
2017-02-01 11:09:33 -05:00
|
|
|
the available phpmd rulesets
|
|
|
|
|
2017-02-09 13:54:49 -05:00
|
|
|
------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.29. xo *ale-linter-options-xo*
|
2017-02-09 13:54:49 -05:00
|
|
|
|
|
|
|
g:ale_javascript_xo_executable *g:ale_javascript_xo_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'xo'`
|
|
|
|
|
|
|
|
ALE will first discover the xo path in an ancestor node_modules
|
|
|
|
directory. If no such path exists, this variable will be used instead.
|
|
|
|
|
|
|
|
This variable can be set to change the path to xo.
|
|
|
|
|
|
|
|
If you wish to use only a globally installed version of xo, set
|
|
|
|
|g:ale_javascript_xo_use_global| to `1`.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_javascript_xo_options *g:ale_javascript_xo_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to pass additional options to xo.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_javascript_xo_use_global *g:ale_javascript_xo_use_global*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
This variable controls whether or not ALE will search for a local path for
|
|
|
|
xo first. If this variable is set to `1`, then ALE will always use the
|
|
|
|
global version of xo, in preference to locally installed versions of
|
|
|
|
xo in node_modules.
|
|
|
|
|
2017-02-11 17:02:38 -05:00
|
|
|
------------------------------------------------------------------------------
|
2017-02-11 18:45:06 -05:00
|
|
|
4.30. javac *ale-linter-options-javac*
|
2017-02-11 17:02:38 -05:00
|
|
|
|
|
|
|
g:ale_java_javac_classpath *g:ale_java_javac_classpath*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to change the global classpath for Java.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_java_javac_options *g:ale_java_javac_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to pass additional options to javac.
|
|
|
|
|
2017-02-15 03:12:24 -05:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
4.31. yamllint *ale-linter-options-yamllint*
|
|
|
|
|
|
|
|
g:ale_yaml_yamllint_executable *g:ale_yaml_yamllint_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'yamllint'`
|
|
|
|
|
|
|
|
This variable can be set to change the path to yamllint.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_yaml_yamllint_options *g:ale_yaml_yamllint_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to pass additional options to yamllint.
|
|
|
|
|
2017-02-25 12:27:03 -05:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
4.32. cmakelint *ale-linter-options-cmakelint*
|
|
|
|
|
|
|
|
g:ale_cmake_cmakelint_exectuable *g:ale_cmake_cmakelint_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
2017-02-27 17:22:39 -05:00
|
|
|
Default: `'cmakelint'`
|
2017-02-25 12:27:03 -05:00
|
|
|
|
|
|
|
This variable can be set to change the path the cmakelint.
|
|
|
|
|
|
|
|
g:ale_cmake_cmakelint_options *g:ale_cmake_cmakelint_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to pass additional options to cmakelint.
|
|
|
|
|
2017-02-26 08:50:43 -05:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
4.33. perl-perl *ale-linter-options-perl-perl*
|
|
|
|
|
|
|
|
g:ale_perl_perl_executable *g:ale_perl_perl_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'perl'`
|
|
|
|
|
|
|
|
This variable can be changed to modify the executable used for linting perl.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_perl_perl_options *g:ale_perl_perl_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'-X -c -Mwarnings -Ilib'`
|
|
|
|
|
|
|
|
This variable can be changed to alter the command-line arguments to the perl
|
|
|
|
invocation.
|
2017-02-25 12:27:03 -05:00
|
|
|
|
2016-11-23 10:19:36 -05:00
|
|
|
===============================================================================
|
|
|
|
5. Linter Integration Notes *ale-linter-integration*
|
|
|
|
|
|
|
|
Some linters may have requirements for some other plugins being installed.
|
|
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
5.1. ocaml-merlin *ale-integration-ocaml-merlin*
|
|
|
|
|
|
|
|
To use merlin linter for OCaml source code you need to make sure Merlin for
|
|
|
|
Vim is correctly configured. See the corresponding Merlin wiki page for
|
|
|
|
detailed instructions
|
|
|
|
(https://github.com/the-lambda-church/merlin/wiki/vim-from-scratch).
|
2016-10-31 01:32:39 -04:00
|
|
|
|
2017-01-12 04:33:55 -05:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
5.2. rust *ale-integration-rust*
|
|
|
|
|
|
|
|
Since Vim does not detect the rust file type out-of-the-box, you need the
|
|
|
|
runtime files for rust from here: https://github.com/rust-lang/rust.vim
|
|
|
|
|
|
|
|
Note that there are two possible linters for rust files:
|
|
|
|
|
|
|
|
1. rustc -- The Rust compiler is used to check the currently edited file.
|
|
|
|
So, if your project consists of multiple files, you will get some errors
|
|
|
|
when you use e.g. a struct which is defined in another file. You can use
|
|
|
|
|g:ale_rust_ignore_error_codes| to ignore some of these errors.
|
|
|
|
2. cargo -- If your project is managed by Cargo, the whole project is
|
|
|
|
checked. That means that all errors are properly shown, but cargo can
|
|
|
|
only operate on the files written on disk. That means it is highly
|
|
|
|
recommended to turn off |g:ale_lint_on_text_changed| and to turn on
|
|
|
|
|g:ale_lint_on_save|.
|
|
|
|
|
2017-02-15 17:59:26 -05:00
|
|
|
Only cargo is enabled by default. To switch to using rustc instead of cargo,
|
|
|
|
configure |g:ale_linters| appropriately: >
|
|
|
|
|
2017-02-15 18:01:15 -05:00
|
|
|
" See the help text for the option for more information.
|
2017-02-15 17:59:26 -05:00
|
|
|
let g:ale_linters = {'rust': ['rustc']}
|
|
|
|
<
|
|
|
|
|
2017-01-12 04:33:55 -05:00
|
|
|
Also note that rustc 1.12. or later is needed.
|
|
|
|
|
2016-10-06 08:42:52 -04:00
|
|
|
===============================================================================
|
2016-11-23 10:19:36 -05:00
|
|
|
6. Commands/Keybinds *ale-commands*
|
2016-10-24 17:09:41 -04:00
|
|
|
|
2017-02-28 04:10:58 -05:00
|
|
|
ALELint *ALELint*
|
|
|
|
|
|
|
|
Run ALE once for the current buffer. This command can be used to run ALE
|
|
|
|
manually, instead of automatically, if desired.
|
|
|
|
|
|
|
|
A plug mapping `<Plug>(ale_lint)` is defined for this command.
|
|
|
|
|
|
|
|
|
2016-10-24 17:09:41 -04:00
|
|
|
ALEPrevious *ALEPrevious*
|
|
|
|
ALEPreviousWrap *ALEPreviousWrap*
|
|
|
|
ALENext *ALENext*
|
2017-03-02 21:55:22 -05:00
|
|
|
ALENextWrap *ALENextWrap*
|
2016-10-24 17:09:41 -04:00
|
|
|
*ale-navigation-commands*
|
|
|
|
|
2017-03-07 18:31:25 -05:00
|
|
|
Move between warnings or errors in a buffer. ALE will only navigate between
|
|
|
|
the errors or warnings it generated, even if both |g:ale_set_quickfix|
|
|
|
|
and |g:ale_set_loclist| are set to `0`.
|
2016-10-24 17:09:41 -04:00
|
|
|
|
|
|
|
`ALEPrevious` and `ALENext` will stop at the top and bottom of a file, while
|
|
|
|
`ALEPreviousWrap` and `ALENextWrap` will wrap around the file to find
|
|
|
|
the last or first warning or error in the file, respectively.
|
|
|
|
|
|
|
|
The following |<Plug>| mappings are defined for the commands: >
|
|
|
|
<Plug>(ale_previous) - ALEPrevious
|
|
|
|
<Plug>(ale_previous_wrap) - ALEPreviousWrap
|
|
|
|
<Plug>(ale_next) - ALENext
|
|
|
|
<Plug>(ale_next_wrap) - ALENextWrap
|
|
|
|
<
|
|
|
|
For example, these commands could be bound to the keys Ctrl + j
|
|
|
|
and Ctrl + k: >
|
|
|
|
|
|
|
|
" Map movement through errors without wrapping.
|
|
|
|
nmap <silent> <C-k> <Plug>(ale_previous)
|
|
|
|
nmap <silent> <C-j> <Plug>(ale_next)
|
|
|
|
" OR map keys to use wrapping.
|
|
|
|
nmap <silent> <C-k> <Plug>(ale_previous_wrap)
|
|
|
|
nmap <silent> <C-j> <Plug>(ale_next_wrap)
|
|
|
|
<
|
|
|
|
|
2017-02-12 14:26:18 -05:00
|
|
|
ALEToggle *ALEToggle*
|
|
|
|
|
|
|
|
Enable or disable ALE, including all of its autocmd events, loclist items,
|
|
|
|
quickfix items, signs, current jobs, etc. Calling this option will change
|
|
|
|
the |g:ale_enabled| variable.
|
|
|
|
|
2017-03-02 21:55:22 -05:00
|
|
|
|
|
|
|
ALEDetail *ALEDetail*
|
|
|
|
|
|
|
|
Show the full linter message for the current line. This will only have an
|
|
|
|
effect on lines that contain a linter message.
|
|
|
|
|
|
|
|
A plug mapping `<Plug>(ale_detail)` is defined for this command.
|
|
|
|
|
2016-10-24 17:09:41 -04:00
|
|
|
===============================================================================
|
2016-11-23 10:19:36 -05:00
|
|
|
7. API *ale-api*
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2017-03-14 19:51:57 -04:00
|
|
|
ale#Queue(delay, [run_file_linters]) *ale#Queue()*
|
|
|
|
|
2016-10-05 19:22:32 -04:00
|
|
|
Run linters for the current buffer, based on the filetype of the buffer,
|
|
|
|
with a given `delay`. A `delay` of `0` will run the linters immediately.
|
|
|
|
The linters will always be run in the background. Calling this function
|
|
|
|
again from the same buffer
|
|
|
|
|
2017-03-14 19:51:57 -04:00
|
|
|
An optional `run_file_linters` argument can be given. If `run_file_linters`
|
|
|
|
is `0`, then no linters where the `lint_file` option is set to `1` will be
|
|
|
|
run. If `run_file_linters` is set to `1`, then all linters for the current
|
|
|
|
file will be run. `run_file_linters` defaults to `0`.
|
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
|
2017-02-11 13:14:18 -05:00
|
|
|
ale#engine#EscapeCommandPart(command_part) *ale#engine#EscapeCommandPart()*
|
|
|
|
|
|
|
|
Given a |String|, return a |String| with all `%` characters replaced with
|
|
|
|
`%%` instead. This function can be used to escape strings which are
|
|
|
|
dynamically generated for commands before handing them over to ALE,
|
|
|
|
so that ALE doesn't treat any strings with `%` formatting sequences
|
|
|
|
specially.
|
|
|
|
|
|
|
|
|
2016-10-24 15:21:32 -04:00
|
|
|
ale#engine#GetLoclist(buffer) *ale#engine#GetLoclist()*
|
|
|
|
|
|
|
|
Given a buffer number, this function will rerurn the list of warnings and
|
|
|
|
errors reported by ALE for a given buffer in the format accepted by
|
|
|
|
|setqflist()|.
|
|
|
|
|
|
|
|
|
2017-02-11 10:16:08 -05:00
|
|
|
ale#engine#ManageFile(buffer, filename) *ale#engine#ManageFile()*
|
|
|
|
|
|
|
|
Given a buffer number for a buffer currently running some linting tasks
|
|
|
|
and a filename, register a filename with ALE for automatic deletion after
|
|
|
|
linting is complete, or when Vim exits.
|
|
|
|
|
|
|
|
If Vim exits suddenly, ALE will try its best to remove temporary files, but
|
|
|
|
ALE cannot guarantee with absolute certainty that the files will be removed.
|
|
|
|
It is advised to create temporary files in the operating system's managed
|
|
|
|
temporary file directory, such as with |tempname()|.
|
|
|
|
|
|
|
|
Directory names should not be given to this function. ALE will only delete
|
|
|
|
files and symlinks given to this function. This is to prevent entire
|
|
|
|
directories from being accidentally deleted, say in cases of writing
|
|
|
|
`dir . '/' . filename` where `filename` is actually `''`, etc. ALE instead
|
|
|
|
manages directories separetly with the |ale#engine#ManageDirectory| function.
|
|
|
|
|
|
|
|
|
|
|
|
ale#engine#ManageDirectory(buffer, directory) *ale#engine#ManageDirectory()*
|
|
|
|
|
|
|
|
Like |ale#engine#ManageFile()|, but directories and all of their contents
|
|
|
|
will be deleted, akin to `rm -rf directory`, which could lead to loss of
|
|
|
|
data if mistakes are made. This command will also delete any temporary
|
|
|
|
filenames given to it.
|
|
|
|
|
|
|
|
It is advised to use |ale#engine#ManageFile()| instead for deleting single
|
|
|
|
files.
|
|
|
|
|
|
|
|
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
ale#linter#Define(filetype, linter) *ale#linter#Define()*
|
2016-10-05 19:22:32 -04:00
|
|
|
Given a |String| for a filetype and a |Dictionary| Describing a linter
|
|
|
|
configuration, add a linter for the given filetype. The dictionaries each
|
|
|
|
offer the following options:
|
|
|
|
|
|
|
|
`name` The name of the linter. These names will be used by
|
|
|
|
|g:ale_linters| option for enabling/disabling
|
|
|
|
particular linters.
|
|
|
|
|
|
|
|
This argument is required.
|
|
|
|
|
|
|
|
`callback` A |String| or |Funcref| for a callback function
|
|
|
|
accepting two arguments (buffer, lines), for a
|
|
|
|
buffer number the output is for, and the lines of
|
|
|
|
output from a linter.
|
|
|
|
|
|
|
|
This callback function should return a |List| of
|
|
|
|
|Dictionary| objects in the format accepted by
|
|
|
|
|setqflist()|. The |List| will be sorted by line and
|
|
|
|
then column order so it can be searched with a binary
|
|
|
|
search by in future before being passed on to the
|
|
|
|
|loclist|, etc.
|
|
|
|
|
|
|
|
This argument is required.
|
|
|
|
|
2017-02-26 09:51:22 -05:00
|
|
|
The keys for each item in the List will be handled in
|
|
|
|
the following manner:
|
|
|
|
|
|
|
|
`text` - This error message is required.
|
|
|
|
`lnum` - The line number is required. Any strings
|
|
|
|
will be automatically converted to numbers by
|
|
|
|
using `str2nr()`.
|
|
|
|
|
|
|
|
Line 0 will be moved to line 1, and lines beyond
|
|
|
|
the end of the file will be moved to the end.
|
|
|
|
`col` - The column number is optional and will
|
|
|
|
default to `0`. Any strings will be automatically
|
|
|
|
coverted to number using `str2nr()`.
|
|
|
|
`bufnr` - The buffer number should match the buffer
|
|
|
|
being checked, and this value will default to
|
|
|
|
the buffer being checked.
|
|
|
|
`vcol` - Defaults to `0`.
|
|
|
|
`type` - Defaults to `'E'`.
|
|
|
|
`nr` - Defaults to `-1`.
|
|
|
|
|
2016-10-05 19:22:32 -04:00
|
|
|
`executable` A |String| naming the executable itself which
|
2017-03-01 19:06:09 -05:00
|
|
|
will be run. This value will be used to check if the
|
2016-10-05 19:22:32 -04:00
|
|
|
program requested is installed or not.
|
|
|
|
|
|
|
|
Either this or the `executable_callback` argument
|
|
|
|
must be provided.
|
|
|
|
|
|
|
|
`executable_callback ` A |String| or |Funcref| for a callback function
|
|
|
|
accepting a buffer number. A |String| should be
|
|
|
|
returned for the executable to check. This can be
|
|
|
|
used in place of `executable` when more complicated
|
|
|
|
processing is needed.
|
|
|
|
|
|
|
|
`command` A |String| for an executable to run asynchronously.
|
|
|
|
This command will be fed the lines from the buffer to
|
|
|
|
check, and will produce the lines of output given to
|
|
|
|
the `callback`.
|
|
|
|
|
|
|
|
`command_callback` A |String| or |Funcref| for a callback function
|
|
|
|
accepting a buffer number. A |String| should be
|
|
|
|
returned for a command to run. This can be used in
|
|
|
|
place of `command` when more complicated processing
|
|
|
|
is needed.
|
|
|
|
|
2017-02-10 18:11:26 -05:00
|
|
|
If an empty string is returned from the callback,
|
|
|
|
no jobs for linting will be run for that linter.
|
|
|
|
This can be used for skipping a linter call,
|
|
|
|
say if no configuration file was found.
|
|
|
|
|
2017-02-09 04:42:17 -05:00
|
|
|
`command_chain` A |List| of |Dictionary| items defining a series
|
|
|
|
of commands to be run. At least one |Dictionary|
|
|
|
|
should be provided. Each Dictionary must contain the
|
|
|
|
key `callback`, defining a |String| or |Funcref| for
|
|
|
|
a function returning a |String| for a command to run.
|
|
|
|
|
|
|
|
The callback functions for each command after the
|
|
|
|
first command in in the chain should accept two
|
|
|
|
arguments `(buffer, output)`, a buffer number and a
|
|
|
|
|List| of lines of output from the previous command
|
|
|
|
in the chain.
|
|
|
|
|
|
|
|
The first callback function in a chain accepts only
|
|
|
|
a `(buffer)` argument, as there are no previous
|
|
|
|
commands to run which return `output`.
|
|
|
|
|
2017-02-10 18:11:26 -05:00
|
|
|
If an empty string is returned for a command in a
|
|
|
|
chain, that command in the chain will be skipped,
|
|
|
|
and the next function in the chain will be called
|
|
|
|
immediately instead. If the last command in a chain
|
|
|
|
returns an empty string, then no linting will be
|
|
|
|
performed.
|
|
|
|
|
2017-02-09 04:42:17 -05:00
|
|
|
Commands in the chain will all use the
|
|
|
|
`output_stream` value provided in the root
|
|
|
|
|Dictionary|. Each command in the chain can also
|
|
|
|
provide an `output_stream` key to override this value.
|
|
|
|
See the `output_stream` description for more
|
|
|
|
information.
|
|
|
|
|
2017-02-09 18:32:57 -05:00
|
|
|
Commands in the chain all behave as if `read_buffer`
|
|
|
|
is set to `0` by default, except for the last command
|
|
|
|
in the chain, which uses the value set for
|
|
|
|
`read_buffer` in the root |Dictionary|. Each command
|
|
|
|
in the chain can also provide a `read_buffer` key
|
|
|
|
to override these values.
|
|
|
|
See the `read_buffer` description for more
|
|
|
|
information.
|
2017-02-09 04:42:17 -05:00
|
|
|
|
2016-10-05 19:22:32 -04:00
|
|
|
`output_stream` A |String| for the output stream the lines of output
|
|
|
|
should be read from for the command which is run. The
|
2016-10-07 12:08:11 -04:00
|
|
|
accepted values are `'stdout'`, `'stderr'`, and
|
|
|
|
`'both'`. This argument defaults to `'stdout'`. This
|
|
|
|
argument can be set for linter programs which output
|
|
|
|
their errors and warnings to the stderr stream
|
|
|
|
instead of stdout. The option `'both'` will read
|
|
|
|
from both stder and stdout at the same time.
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2017-02-09 18:32:57 -05:00
|
|
|
`read_buffer` A |Number| (`0` or `1`) indicating whether a command
|
|
|
|
should read the Vim buffer as input via stdin. This
|
|
|
|
option is set to `1` by default, and can be disabled
|
|
|
|
if a command manually reads from a temporary file
|
|
|
|
instead, etc.
|
|
|
|
|
2017-02-09 04:42:17 -05:00
|
|
|
Only one of `command`, `command_callback`, or `command_chain` should be
|
|
|
|
specified. `command_callback` is generally recommended when a command string
|
|
|
|
needs to be generated dynamically, or any global options are used.
|
|
|
|
`command_chain` is recommended where any system calls need to be made to
|
|
|
|
retrieve some kind of information before running the final command.
|
|
|
|
|
2017-02-11 10:16:08 -05:00
|
|
|
If temporary files or directories are created for commands run with
|
|
|
|
`command_callback` or `command_chain`, then these tempoary files or
|
|
|
|
directories can be managed by ALE, for automatic deletion.
|
|
|
|
See |ale#engine#ManageFile()| and |ale#engine#ManageDirectory| for more
|
|
|
|
information.
|
|
|
|
|
2017-02-11 13:14:18 -05:00
|
|
|
All command strings will be formatted for special character sequences.
|
|
|
|
Any substring `%s` will be replaced with the full path to the current file
|
|
|
|
being edited. This format option can be used to pass the exact filename
|
|
|
|
being edited to a program.
|
|
|
|
|
2016-10-05 19:22:32 -04:00
|
|
|
For example: >
|
2017-02-11 13:14:18 -05:00
|
|
|
'command': 'eslint -f unix --stdin --stdin-filename %s'
|
2016-10-05 19:22:32 -04:00
|
|
|
<
|
2017-02-11 13:14:18 -05:00
|
|
|
Any substring `%t` will be replaced with a path to a temporary file. Merely
|
|
|
|
adding `%t` will cause ALE to create a temporary file containing the
|
2017-03-01 19:06:09 -05:00
|
|
|
contents of the buffer being checked. All occurrences of `%t` in command
|
2017-02-11 13:14:18 -05:00
|
|
|
strings will reference the one temporary file. The temporary file will be
|
|
|
|
created inside a temporary directory, and the entire temporary directory
|
|
|
|
will be automatically deleted, following the behaviour of
|
|
|
|
|ale#engine#ManageDirectory|. This option can be used for some linters which
|
|
|
|
do not support reading from stdin.
|
|
|
|
|
|
|
|
For example: >
|
|
|
|
'command': 'ghc -fno-code -v0 %t',
|
|
|
|
<
|
|
|
|
The character sequence `%%` can be used to emit a literal `%` into a
|
|
|
|
command, so literal character sequences `%s` and `%t` can be escaped by
|
|
|
|
using `%%s` and `%%t` instead, etc.
|
|
|
|
|
|
|
|
If a callback for a command generates part of a command string which might
|
|
|
|
possibly contain `%%`, `%s`, or `%t` where the special formatting behaviour
|
|
|
|
is not desired, the |ale#engine#EscapeCommandPart()| function can be used to
|
|
|
|
replace those characters to avoid formatting issues.
|
|
|
|
|
2016-10-05 19:22:32 -04:00
|
|
|
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
ale#linter#Get(filetype) *ale#linter#Get()*
|
2016-10-05 19:22:32 -04:00
|
|
|
Return all of linters configured for a given filetype as a |List| of
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
|Dictionary| values in the format specified by |ale#linter#Define()|.
|
2016-10-05 19:22:32 -04:00
|
|
|
|
2016-10-22 09:29:30 -04:00
|
|
|
Filetypes may be dot-seperated to invoke linters for multiple filetypes:
|
|
|
|
for instance, the filetype `javascript.jsx` will return linters for both the
|
|
|
|
`javascript` and `jsx` filetype.
|
|
|
|
|
|
|
|
Aliases may be defined in as described in |g:ale_linter_aliases|. Aliases
|
|
|
|
are applied after dot-seperated filetypes are broken up into their
|
|
|
|
components.
|
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
ale#statusline#Status() *ale#statusline#Status()*
|
2016-10-07 12:48:47 -04:00
|
|
|
Return a formatted string that can be added to the statusline.
|
2016-10-09 16:13:33 -04:00
|
|
|
The output's format is defined in |`g:ale_statusline_format`|.
|
2016-10-07 12:48:47 -04:00
|
|
|
To enable it, the following should be present in your |statusline| settings: >
|
2016-10-13 09:01:48 -04:00
|
|
|
%{ale#statusline#Status()}
|
2016-10-07 12:48:47 -04:00
|
|
|
|
2016-10-09 16:20:21 -04:00
|
|
|
|
2017-02-28 04:10:58 -05:00
|
|
|
ALELint *ALELint-autocmd*
|
2016-10-13 09:01:48 -04:00
|
|
|
This |User| autocommand is triggered by ALE every time it completes a lint
|
|
|
|
operation. It can be used to update statuslines, send notifications, or
|
|
|
|
complete any other operation that needs to be done after a lint run.
|
|
|
|
It can be used simply:
|
|
|
|
autocmd User ALELint echom "ALE run!"
|
|
|
|
|
|
|
|
|
2016-10-11 16:55:26 -04:00
|
|
|
===============================================================================
|
2016-11-23 10:19:36 -05:00
|
|
|
8. Special Thanks *ale-special-thanks*
|
2016-10-11 16:55:26 -04:00
|
|
|
|
|
|
|
Special thanks to Mark Grealish (https://www.bhalash.com/) for providing ALE's
|
|
|
|
snazzy looking ale glass logo. Cheers, Mark!
|
2016-10-09 16:20:21 -04:00
|
|
|
|
2016-10-05 19:22:32 -04:00
|
|
|
===============================================================================
|
2016-11-23 10:19:36 -05:00
|
|
|
9. Contact *ale-contact*
|
2016-10-05 19:22:32 -04:00
|
|
|
|
|
|
|
If you like this plugin, and wish to get in touch, check out the GitHub
|
|
|
|
page for issues and more at https://github.com/w0rp/ale
|
|
|
|
|
|
|
|
If you wish to contact the author of this plugin directly, please feel
|
|
|
|
free to send an email to devw0rp@gmail.com.
|
|
|
|
|
|
|
|
|
|
|
|
Please drink responsibly, or not at all, which is ironically the preference
|
|
|
|
of w0rp, who is teetotal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|