mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
16
sources_non_forked/ale/doc/ale-ansible.txt
Normal file
16
sources_non_forked/ale/doc/ale-ansible.txt
Normal file
@ -0,0 +1,16 @@
|
||||
===============================================================================
|
||||
ALE Ansible Integration *ale-ansible-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
ansible-lint *ale-ansible-ansible-lint*
|
||||
|
||||
g:ale_ansible_ansible_lint_executable *g:ale_ansible_ansible_lint_executable*
|
||||
*b:ale_ansible_ansible_lint_executable*
|
||||
Type: |String|
|
||||
Default: `'ansible-lint'`
|
||||
|
||||
This variable can be changed to modify the executable used for ansible-lint.
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
@ -130,7 +130,7 @@ overrides |g:ale_c_build_dir_names|.
|
||||
g:ale_c_clangtidy_checks *g:ale_c_clangtidy_checks*
|
||||
*b:ale_c_clangtidy_checks*
|
||||
Type: |List|
|
||||
Default: `['*']`
|
||||
Default: `[]`
|
||||
|
||||
The checks to enable for clang-tidy with the `-checks` argument.
|
||||
|
||||
|
@ -103,7 +103,7 @@ overrides |g:ale_c_build_dir_names|.
|
||||
g:ale_cpp_clangtidy_checks *g:ale_cpp_clangtidy_checks*
|
||||
*b:ale_cpp_clangtidy_checks*
|
||||
Type: |List|
|
||||
Default: `['*']`
|
||||
Default: `[]`
|
||||
|
||||
The checks to enable for clang-tidy with the `-checks` argument.
|
||||
|
||||
|
@ -2,6 +2,10 @@
|
||||
ALE C# Integration *ale-cs-options*
|
||||
|
||||
|
||||
In addition to the linters that are provided with ALE, C# code can be checked
|
||||
with the OmniSharp plugin. See here: https://github.com/OmniSharp/omnisharp-vim
|
||||
|
||||
|
||||
===============================================================================
|
||||
mcs *ale-cs-mcs*
|
||||
|
||||
|
@ -2,6 +2,17 @@
|
||||
ALE D Integration *ale-d-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
dls *ale-d-dls*
|
||||
|
||||
g:ale_d_dls_executable *g:ale_d_dls_executable*
|
||||
*b:ale_d_dls_executable*
|
||||
Type: |String|
|
||||
Default: `dls`
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
===============================================================================
|
||||
uncrustify *ale-d-uncrustify*
|
||||
|
||||
|
@ -306,6 +306,7 @@ given the above setup are as follows.
|
||||
`AssertLinterNotExecuted` - Check that linters will not be executed.
|
||||
`AssertLSPLanguage language` - Check the language given to an LSP server.
|
||||
`AssertLSPOptions options_dict` - Check the options given to an LSP server.
|
||||
`AssertLSPConfig config_dict` - Check the config given to an LSP server.
|
||||
`AssertLSPProject project_root` - Check the root given to an LSP server.
|
||||
`AssertLSPAddress address` - Check the address to an LSP server.
|
||||
|
||||
|
@ -2,6 +2,29 @@
|
||||
ALE Dockerfile Integration *ale-dockerfile-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
dockerfile_lint *ale-dockerfile-dockerfile_lint*
|
||||
|
||||
g:ale_dockerfile_dockerfile_lint_executable
|
||||
*g:ale_dockerfile_dockerfile_lint_executable*
|
||||
*b:ale_dockerfile_dockerfile_lint_executable*
|
||||
Type: |String|
|
||||
Default: `'dockerfile_lint'`
|
||||
|
||||
This variable can be changed to specify the executable used to run
|
||||
dockerfile_lint.
|
||||
|
||||
|
||||
g:ale_dockerfile_dockerfile_lint_options
|
||||
*g:ale_dockerfile_dockerfile_lint_options*
|
||||
*b:ale_dockerfile_dockerfile_lint_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be changed to add additional command-line arguments to
|
||||
the dockerfile lint invocation - like custom rule file definitions.
|
||||
|
||||
|
||||
===============================================================================
|
||||
hadolint *ale-dockerfile-hadolint*
|
||||
|
||||
|
@ -40,5 +40,18 @@ configured on your project's `mix.exs`.
|
||||
See https://github.com/jeremyjh/dialyxir#with-explaining-stuff for more
|
||||
information.
|
||||
|
||||
===============================================================================
|
||||
elixir-ls *ale-elixir-elixir-ls*
|
||||
|
||||
Elixir Language Server (https://github.com/JakeBecker/elixir-ls)
|
||||
|
||||
g:ale_elixir_elixir_ls_release *g:ale_elixir_elixir_ls_release*
|
||||
*b:ale_elixir_elixir_ls_release*
|
||||
Type: |String|
|
||||
Default: `'elixir-ls'`
|
||||
|
||||
Location of the elixir-ls release directory. This directory must contain
|
||||
the language server scripts (language_server.sh and language_server.bat).
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
11
sources_non_forked/ale/doc/ale-hcl.txt
Normal file
11
sources_non_forked/ale/doc/ale-hcl.txt
Normal file
@ -0,0 +1,11 @@
|
||||
===============================================================================
|
||||
ALE HCL Integration *ale-hcl-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
terraform-fmt *ale-hcl-terraform-fmt*
|
||||
|
||||
See |ale-terraform-fmt| for information about the available options.
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
@ -73,6 +73,13 @@ g:ale_json_jq_options *g:ale_json_jq_options*
|
||||
|
||||
This option can be changed to pass extra options to `jq`.
|
||||
|
||||
g:ale_json_jq_filters *g:ale_json_jq_filters*
|
||||
*b:ale_json_jq_filters*
|
||||
Type: |String|
|
||||
Default: `'.'`
|
||||
|
||||
This option can be changed to pass custom filters to `jq`.
|
||||
|
||||
|
||||
===============================================================================
|
||||
prettier *ale-json-prettier*
|
||||
|
43
sources_non_forked/ale/doc/ale-perl6.txt
Normal file
43
sources_non_forked/ale/doc/ale-perl6.txt
Normal file
@ -0,0 +1,43 @@
|
||||
===============================================================================
|
||||
ALE Perl6 Integration *ale-perl6-options*
|
||||
|
||||
Checking code with `perl6` is disabled by default, as `perl6` code cannot be
|
||||
checked without executing it. Specifically, we use the `-c` flag to see if
|
||||
`perl6` code compiles. This does not execute all of the code in a file, but it
|
||||
does run `BEGIN` and `CHECK` blocks. See `perl6 --help`
|
||||
|
||||
Full support requires a perl6 implementation that supports the
|
||||
PERL6_EXCEPTIONS_HANDLER environment variable and JSON error output,
|
||||
which was specified in 6.d. Rakudo version 2018.08 is the first rakudo release
|
||||
that supports this. See `perl6 --version` and
|
||||
https://docs.perl6.org/programs/03-environment-variables.
|
||||
|
||||
Without this variable, errors and warnings will appear at line 1, and can be
|
||||
viewed with ALEDetail. This also serves as a fallback for errors and warnings
|
||||
that do not trigger JSON output.
|
||||
|
||||
See |g:ale_linters|.
|
||||
|
||||
|
||||
===============================================================================
|
||||
perl6 *ale-perl6-perl6*
|
||||
|
||||
g:ale_perl6_perl6_executable *g:ale_perl6_perl6_executable*
|
||||
*b:ale_perl6_perl6_executable*
|
||||
Type: |String|
|
||||
Default: `'perl6'`
|
||||
|
||||
This variable can be changed to modify the executable used for linting
|
||||
perl6.
|
||||
|
||||
|
||||
g:ale_perl6_perl6_options *g:ale_perl6_perl6_options*
|
||||
*b:ale_perl6_perl6_options*
|
||||
Type: |String|
|
||||
Default: `'-c -Ilib'`
|
||||
|
||||
This variable can be changed to alter the command-line arguments to the
|
||||
perl6 invocation.
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
56
sources_non_forked/ale/doc/ale-prolog.txt
Normal file
56
sources_non_forked/ale/doc/ale-prolog.txt
Normal file
@ -0,0 +1,56 @@
|
||||
===============================================================================
|
||||
ALE Prolog Integration *ale-prolog-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
swipl *ale-prolog-swipl*
|
||||
|
||||
g:ale_prolog_swipl_executable *g:ale_prolog_swipl_executable*
|
||||
*b:ale_prolog_swipl_executable*
|
||||
Type: |String|
|
||||
Default: `'swipl'`
|
||||
|
||||
The executable that will be run for the `swipl` linter.
|
||||
|
||||
g:ale_prolog_swipl_load *g:ale_prolog_swipl_load*
|
||||
*b:ale_prolog_swipl_load*
|
||||
Type: |String|
|
||||
Default: `'current_prolog_flag(argv, [File]), load_files(File, [sandboxed(true)]), halt.'`
|
||||
|
||||
The prolog goals that will be passed to |g:ale_prolog_swipl_executable| with `-g` option.
|
||||
|
||||
It does:
|
||||
1. Takes the first command argument (current file path)
|
||||
2. Checks (syntactic / semantic) problems and output to stderr
|
||||
|
||||
NOTE: `sandboxed(true)` prohibits executing some directives such as 'initialization main'.
|
||||
|
||||
g:ale_prolog_swipl_timeout *g:ale_prolog_swipl_timeout*
|
||||
*b:ale_prolog_swipl_timeout*
|
||||
Type: |Number|
|
||||
Default: `3`
|
||||
|
||||
Timeout seconds to detect long-running linter.
|
||||
It is done by setting SIGALRM.
|
||||
See |g:ale_prolog_swipl_alarm| and |g:ale_prolog_swipl_alarm_handler|.
|
||||
|
||||
g:ale_prolog_swipl_alarm *g:ale_prolog_swipl_alarm*
|
||||
*b:ale_prolog_swipl_alarm*
|
||||
Type: |String|
|
||||
Default: `'alarm(%t, (%h), _, [])'`
|
||||
|
||||
The prolog goals to be expected to set SIGALRM.
|
||||
`%t` is replaced by |g:ale_prolog_swipl_timeout|.
|
||||
`%h` is replaced by |g:ale_prolog_swipl_alarm_handler|.
|
||||
|
||||
g:ale_prolog_swipl_alarm_handler *g:ale_prolog_swipl_alarm_handler*
|
||||
*b:ale_prolog_swipl_alarm_handler*
|
||||
Type: |String|
|
||||
Default: `'writeln(user_error, "ERROR: Exceeded %t seconds, Please change g:prolog_swipl_timeout to modify the limit."), halt(1)'`
|
||||
|
||||
The prolog goals to be expected that will be run on SIGALRM.
|
||||
`%t` is replaced by |g:ale_prolog_swipl_timeout|.
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
@ -109,6 +109,7 @@ g:ale_rust_cargo_include_features *g:ale_rust_cargo_include_features*
|
||||
When defined, ALE will set the `--features` option when invoking `cargo` to
|
||||
perform the lint check. See |g:ale_rust_cargo_default_feature_behavior|.
|
||||
|
||||
|
||||
g:ale_rust_cargo_avoid_whole_workspace *g:ale_rust_cargo_avoid_whole_workspace*
|
||||
*b:ale_rust_cargo_avoid_whole_workspace*
|
||||
Type: |Number|
|
||||
@ -119,6 +120,36 @@ g:ale_rust_cargo_avoid_whole_workspace *g:ale_rust_cargo_avoid_whole_workspace*
|
||||
in the crate's directory. Otherwise, behave as usual.
|
||||
|
||||
|
||||
g:ale_rust_cargo_use_clippy
|
||||
*g:ale_rust_cargo_use_clippy*
|
||||
*b:ale_rust_cargo_use_clippy*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
When set to 1, `cargo clippy` will be used instead of `cargo check` or
|
||||
`cargo build` as linter.
|
||||
For details of `cargo clippy`, please visit the following link:
|
||||
|
||||
https://github.com/rust-lang-nursery/rust-clippy
|
||||
|
||||
Since `cargo clippy` is optional toolchain, it's safer to check whether
|
||||
`cargo-clippy` is executable as follows:
|
||||
>
|
||||
let g:ale_rust_cargo_use_clippy = executable('cargo-clippy')
|
||||
<
|
||||
|
||||
g:ale_rust_cargo_clippy_options
|
||||
*g:ale_rust_cargo_clippy_options*
|
||||
*b:ale_rust_cargo_clippy_options*
|
||||
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
When `cargo clippy` is used, this value will be added to a command line to run
|
||||
it. This variable is useful when you want to add some extra options which
|
||||
only `cargo clippy` supports (e.g. `--deny`).
|
||||
|
||||
|
||||
===============================================================================
|
||||
rls *ale-rust-rls*
|
||||
|
||||
@ -167,6 +198,22 @@ g:ale_rust_ignore_error_codes *g:ale_rust_ignore_error_codes*
|
||||
>
|
||||
let g:ale_rust_ignore_error_codes = ['E0432', 'E0433']
|
||||
|
||||
g:ale_rust_ignore_secondary_spans *g:ale_rust_ignore_secondary_spans*
|
||||
*b:ale_rust_ignore_secondary_spans*
|
||||
Type: Number
|
||||
Default: 0
|
||||
|
||||
When set to 1, instructs the Rust error repporting to ignore secondary
|
||||
spans. The problem with secondary spans is that they sometimes appear in
|
||||
error messages before the main cause of the error, for example: >
|
||||
|
||||
1 src/main.rs|98 col 5 error| this function takes 4 parameters but 5
|
||||
parameters were supplied: defined here
|
||||
2 src/main.rs|430 col 32 error| this function takes 4 parameters but 5
|
||||
parameters were supplied: expected 4 parameters
|
||||
<
|
||||
This is due to the sorting by line numbers. With this option set to 1,
|
||||
the 'defined here' span will not be presented.
|
||||
|
||||
===============================================================================
|
||||
rustfmt *ale-rust-rustfmt*
|
||||
|
@ -2,6 +2,24 @@
|
||||
ALE Terraform Integration *ale-terraform-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
fmt *ale-terraform-fmt*
|
||||
|
||||
g:ale_terraform_fmt_executable *g:ale_terraform_fmt_executable*
|
||||
*b:ale_terraform_fmt_executable*
|
||||
|
||||
Type: |String|
|
||||
Default: `'terraform'`
|
||||
|
||||
This variable can be changed to use a different executable for terraform.
|
||||
|
||||
|
||||
g:ale_terraform_fmt_options *g:ale_terraform_fmt_options*
|
||||
*b:ale_terraform_fmt_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
|
||||
===============================================================================
|
||||
tflint *ale-terraform-tflint*
|
||||
|
||||
|
@ -9,15 +9,20 @@ CONTENTS *ale-contents*
|
||||
1. Introduction.........................|ale-introduction|
|
||||
2. Supported Languages & Tools..........|ale-support|
|
||||
3. Linting..............................|ale-lint|
|
||||
3.1 Other Sources.....................|ale-lint-other-sources|
|
||||
4. Fixing Problems......................|ale-fix|
|
||||
5. Language Server Protocol Support.....|ale-lsp|
|
||||
5.1 Completion........................|ale-completion|
|
||||
5.2 Go To Definition..................|ale-go-to-definition|
|
||||
5.3 Find References...................|ale-find-references|
|
||||
5.4 Hovering..........................|ale-hover|
|
||||
5.5 Symbol Search.....................|ale-symbol-search|
|
||||
6. Global Options.......................|ale-options|
|
||||
6.1 Highlights........................|ale-highlights|
|
||||
6.2 Options for write-good Linter.....|ale-write-good-options|
|
||||
7. Integration Documentation............|ale-integrations|
|
||||
ansible...............................|ale-ansible-options|
|
||||
ansible-lint........................|ale-ansible-ansible-lint|
|
||||
asciidoc..............................|ale-asciidoc-options|
|
||||
write-good..........................|ale-asciidoc-write-good|
|
||||
asm...................................|ale-asm-options|
|
||||
@ -67,16 +72,19 @@ CONTENTS *ale-contents*
|
||||
cuda..................................|ale-cuda-options|
|
||||
nvcc................................|ale-cuda-nvcc|
|
||||
d.....................................|ale-d-options|
|
||||
dls.................................|ale-d-dls|
|
||||
uncrustify..........................|ale-d-uncrustify|
|
||||
dart..................................|ale-dart-options|
|
||||
dartanalyzer........................|ale-dart-dartanalyzer|
|
||||
dartfmt.............................|ale-dart-dartfmt|
|
||||
dockerfile............................|ale-dockerfile-options|
|
||||
dockerfile_lint.....................|ale-dockerfile-dockerfile_lint|
|
||||
hadolint............................|ale-dockerfile-hadolint|
|
||||
elixir................................|ale-elixir-options|
|
||||
mix.................................|ale-elixir-mix|
|
||||
mix_format..........................|ale-elixir-mix-format|
|
||||
dialyxir............................|ale-elixir-dialyxir|
|
||||
elixir-ls...........................|ale-elixir-elixir-ls|
|
||||
elm...................................|ale-elm-options|
|
||||
elm-format..........................|ale-elm-elm-format|
|
||||
elm-make............................|ale-elm-elm-make|
|
||||
@ -125,6 +133,8 @@ CONTENTS *ale-contents*
|
||||
stack-build.........................|ale-haskell-stack-build|
|
||||
stylish-haskell.....................|ale-haskell-stylish-haskell|
|
||||
hie.................................|ale-haskell-hie|
|
||||
hcl...................................|ale-hcl-options|
|
||||
terraform-fmt.......................|ale-hcl-terraform-fmt|
|
||||
html..................................|ale-html-options|
|
||||
htmlhint............................|ale-html-htmlhint|
|
||||
tidy................................|ale-html-tidy|
|
||||
@ -203,6 +213,8 @@ CONTENTS *ale-contents*
|
||||
perl................................|ale-perl-perl|
|
||||
perlcritic..........................|ale-perl-perlcritic|
|
||||
perltidy............................|ale-perl-perltidy|
|
||||
perl6.................................|ale-perl6-options|
|
||||
perl6...............................|ale-perl6-perl6|
|
||||
php...................................|ale-php-options|
|
||||
langserver..........................|ale-php-langserver|
|
||||
phan................................|ale-php-phan|
|
||||
@ -218,6 +230,8 @@ CONTENTS *ale-contents*
|
||||
write-good..........................|ale-pod-write-good|
|
||||
pony..................................|ale-pony-options|
|
||||
ponyc...............................|ale-pony-ponyc|
|
||||
prolog................................|ale-prolog-options|
|
||||
swipl...............................|ale-prolog-swipl|
|
||||
proto.................................|ale-proto-options|
|
||||
protoc-gen-lint.....................|ale-proto-protoc-gen-lint|
|
||||
pug...................................|ale-pug-options|
|
||||
@ -293,6 +307,7 @@ CONTENTS *ale-contents*
|
||||
tcl...................................|ale-tcl-options|
|
||||
nagelfar............................|ale-tcl-nagelfar|
|
||||
terraform.............................|ale-terraform-options|
|
||||
fmt.................................|ale-terraform-fmt|
|
||||
tflint..............................|ale-terraform-tflint|
|
||||
tex...................................|ale-tex-options|
|
||||
chktex..............................|ale-tex-chktex|
|
||||
@ -393,11 +408,11 @@ Notes:
|
||||
* CSS: `csslint`, `prettier`, `stylelint`
|
||||
* Cucumber: `cucumber`
|
||||
* Cython (pyrex filetype): `cython`
|
||||
* D: `dmd`, `uncrustify`
|
||||
* D: `dls`, `dmd`, `uncrustify`
|
||||
* Dafny: `dafny`!!
|
||||
* Dart: `dartanalyzer`!!, `language_server`, dartfmt!!
|
||||
* Dockerfile: `hadolint`
|
||||
* Elixir: `credo`, `dialyxir`, `dogma`, `mix`!!
|
||||
* Dockerfile: `dockerfile_lint`, `hadolint`
|
||||
* Elixir: `credo`, `dialyxir`, `dogma`, `mix`!!, `elixir-ls`
|
||||
* Elm: `elm-format, elm-make`
|
||||
* Erb: `erb`, `erubi`, `erubis`
|
||||
* Erlang: `erlc`, `SyntaxErl`
|
||||
@ -413,6 +428,7 @@ Notes:
|
||||
* Haml: `haml-lint`
|
||||
* Handlebars: `ember-template-lint`
|
||||
* Haskell: `brittany`, `ghc`, `cabal-ghc`, `stylish-haskell`, `stack-ghc`, `stack-build`!!, `ghc-mod`, `hlint`, `hdevtools`, `hfmt`, `hie`
|
||||
* HCL: `terraform-fmt`
|
||||
* HTML: `alex`!!, `HTMLHint`, `proselint`, `tidy`, `write-good`
|
||||
* Idris: `idris`
|
||||
* Java: `checkstyle`, `javac`, `google-java-format`, `PMD`, `javalsp`, `uncrustify`
|
||||
@ -438,10 +454,12 @@ Notes:
|
||||
* OCaml: `merlin` (see |ale-ocaml-merlin|), `ols`, `ocamlformat`
|
||||
* Pawn: `uncrustify`
|
||||
* Perl: `perl -c`, `perl-critic`, `perltidy`
|
||||
* Perl6: `perl6 -c`
|
||||
* PHP: `langserver`, `phan`, `php -l`, `phpcs`, `phpmd`, `phpstan`, `phpcbf`, `php-cs-fixer`, `psalm`!!
|
||||
* PO: `alex`!!, `msgfmt`, `proselint`, `write-good`
|
||||
* Pod: `alex`!!, `proselint`, `write-good`
|
||||
* Pony: `ponyc`
|
||||
* Prolog: `swipl`
|
||||
* proto: `protoc-gen-lint`
|
||||
* Pug: `pug-lint`
|
||||
* Puppet: `languageserver`, `puppet`, `puppet-lint`
|
||||
@ -464,7 +482,7 @@ Notes:
|
||||
* SQL: `sqlint`, `sqlfmt`
|
||||
* Swift: `swiftlint`, `swiftformat`
|
||||
* Tcl: `nagelfar`!!
|
||||
* Terraform: `tflint`
|
||||
* Terraform: `fmt`, `tflint`
|
||||
* Texinfo: `alex`!!, `proselint`, `write-good`
|
||||
* Text^: `alex`!!, `proselint`, `redpen`, `textlint`, `vale`, `write-good`
|
||||
* Thrift: `thrift`
|
||||
@ -559,6 +577,68 @@ ALE offers several options for controlling which linters are run.
|
||||
* Only running linters you asked for. - |g:ale_linters_explicit|
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
3.1 Other Sources *ale-lint-other-sources*
|
||||
|
||||
Problems for a buffer can be taken from other sources and rendered by ALE.
|
||||
This allows ALE to be used in combination with other plugins which also want
|
||||
to display any problems they might find with a buffer. ALE's API includes the
|
||||
following components for making this possible.
|
||||
|
||||
* |ale#other_source#StartChecking()| - Tell ALE that a buffer is being checked.
|
||||
* |ale#other_source#ShowResults()| - Show results from another source.
|
||||
* |ALEWantResults| - A signal for when ALE wants results.
|
||||
|
||||
Other resources can provide results for ALE to display at any time, following
|
||||
ALE's loclist format. (See |ale-loclist-format|) For example: >
|
||||
|
||||
" Tell ALE to show some results.
|
||||
" This function can be called at any time.
|
||||
call ale#other_source#ShowResults(bufnr(''), 'some-linter-name', [
|
||||
\ {'text': 'Something went wrong', 'lnum': 13},
|
||||
\])
|
||||
<
|
||||
|
||||
Other sources should use a unique name for identifying themselves. A single
|
||||
linter name can be used for all problems from another source, or a series of
|
||||
unique linter names can be used. Results can be cleared for that source by
|
||||
providing an empty List.
|
||||
|
||||
|ale#other_source#StartChecking()| should be called whenever another source
|
||||
starts checking a buffer, so other tools can know that a buffer is being
|
||||
checked by some plugin. The |ALEWantResults| autocmd event can be used to
|
||||
start checking a buffer for problems every time that ALE does. When
|
||||
|ALEWantResults| is signaled, |g:ale_want_results_buffer| will be set to the
|
||||
number of the buffer that ALE wants to check.
|
||||
|ale#other_source#StartChecking()| should be called synchronously, and other
|
||||
sources should perform their checks on a buffer in the background
|
||||
asynchronously, so they don't interrupt editing.
|
||||
|
||||
A plugin might integrate its own checks with ALE like so: >
|
||||
|
||||
augroup SomeGroupName
|
||||
autocmd!
|
||||
autocmd User ALEWantResults call Hook(g:ale_want_results_buffer)
|
||||
augroup END
|
||||
|
||||
function! DoBackgroundWork(buffer) abort
|
||||
" Start some work in the background here.
|
||||
" ...
|
||||
" Then call WorkDone(a:buffer, results)
|
||||
endfunction
|
||||
|
||||
function! Hook(buffer) abort
|
||||
" Tell ALE we're going to check this buffer.
|
||||
call ale#other_source#StartChecking(a:buffer, 'some-name')
|
||||
call DoBackgroundWork(a:buffer)
|
||||
endfunction
|
||||
|
||||
function! WorkDone(buffer, results) abort
|
||||
" Send results to ALE after they have been collected.
|
||||
call ale#other_source#ShowResults(buffer, 'some-name', a:results)
|
||||
endfunction
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
4. Fixing Problems *ale-fix*
|
||||
|
||||
@ -709,10 +789,11 @@ Completion is only supported while at least one LSP linter is enabled. ALE
|
||||
will only suggest symbols provided by the LSP servers.
|
||||
|
||||
Suggestions will be made while you type after completion is enabled.
|
||||
Completion can be enabled by setting |g:ale_completion_enabled| to `1`. The
|
||||
delay for completion can be configured with |g:ale_completion_delay|. ALE will
|
||||
only suggest so many possible matches for completion. The maximum number of
|
||||
items can be controlled with |g:ale_completion_max_suggestions|.
|
||||
Completion can be enabled by setting |g:ale_completion_enabled| to `1`. This
|
||||
setting must be set to `1` before ALE is loaded. The delay for completion can
|
||||
be configured with |g:ale_completion_delay|. ALE will only suggest so many
|
||||
possible matches for completion. The maximum number of items can be controlled
|
||||
with |g:ale_completion_max_suggestions|.
|
||||
|
||||
If you don't like some of the suggestions you see, you can filter them out
|
||||
with |g:ale_completion_excluded_words| or |b:ale_completion_excluded_words|.
|
||||
@ -758,12 +839,34 @@ at the cursor taken from LSP linters. The following commands are supported:
|
||||
|
||||
|ALEHover| - Print information about the symbol at the cursor.
|
||||
|
||||
If |b:ale_set_balloons| is set to `1` and your version of Vim supports the
|
||||
If |g:ale_set_balloons| is set to `1` and your version of Vim supports the
|
||||
|balloon_show()| function, then "hover" information also show up when you move
|
||||
the mouse over a symbol in a buffer. Diagnostic information will take priority
|
||||
over hover information for balloons. If a line contains a problem, that
|
||||
problem will be displayed in a balloon instead of hover information.
|
||||
|
||||
For Vim 8.1+ terminals, mouse hovering is disabled by default. Enabling
|
||||
|balloonexpr| commands in terminals can cause scrolling issues in terminals,
|
||||
so ALE will not attempt to show balloons unless |g:ale_set_balloons| is set to
|
||||
`1` before ALE is loaded.
|
||||
|
||||
For enabling mouse support in terminals, you may have to change your mouse
|
||||
settings. For example: >
|
||||
|
||||
" Example mouse settings.
|
||||
" You will need to try different settings, depending on your terminal.
|
||||
set mouse=a
|
||||
set ttymouse=xterm
|
||||
<
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
5.5 Symbol Search *ale-symbol-search*
|
||||
|
||||
ALE supports searching for workspace symbols via LSP linters. The following
|
||||
commands are supported:
|
||||
|
||||
|ALESymbolSearch| - Search for symbols in the workspace.
|
||||
|
||||
|
||||
===============================================================================
|
||||
6. Global Options *ale-options*
|
||||
@ -876,6 +979,9 @@ g:ale_completion_enabled *g:ale_completion_enabled*
|
||||
|
||||
When this option is set to `1`, completion support will be enabled.
|
||||
|
||||
This setting must be set to `1` before ALE is loaded for this behavior
|
||||
to be enabled.
|
||||
|
||||
See |ale-completion|
|
||||
|
||||
|
||||
@ -1282,10 +1388,12 @@ g:ale_linter_aliases *g:ale_linter_aliases*
|
||||
ALE will first look for aliases for filetypes in the `b:ale_linter_aliases`
|
||||
variable, then `g:ale_linter_aliases`, and then a default Dictionary.
|
||||
|
||||
`b:ale_linter_aliases` can be set to a |List|, to tell ALE to load the
|
||||
linters for specific filetypes for a given buffer. >
|
||||
`b:ale_linter_aliases` can be set to a |List| or a |String|, to tell ALE to
|
||||
load the linters for specific filetypes for a given buffer. >
|
||||
|
||||
let b:ale_linter_aliases = ['html', 'javascript', 'css']
|
||||
" OR, Alias a filetype to only a single filetype with a String.
|
||||
let b:ale_linter_aliases = 'javascript'
|
||||
<
|
||||
No linters will be loaded when the buffer's filetype is empty.
|
||||
|
||||
@ -1306,6 +1414,7 @@ g:ale_linters *g:ale_linters*
|
||||
\ 'hack': ['hack'],
|
||||
\ 'help': [],
|
||||
\ 'perl': ['perlcritic'],
|
||||
\ 'perl6': [],
|
||||
\ 'python': ['flake8', 'mypy', 'pylint'],
|
||||
\ 'rust': ['cargo'],
|
||||
\ 'spec': [],
|
||||
@ -2049,6 +2158,14 @@ ALEHover *ALEHover*
|
||||
|
||||
A plug mapping `<Plug>(ale_hover)` is defined for this command.
|
||||
|
||||
|
||||
ALESymbolSearch `<query>` *ALESymbolSearch*
|
||||
|
||||
Search for symbols in the workspace, taken from any available LSP linters.
|
||||
|
||||
The arguments provided to this command will be used as a search query for
|
||||
finding symbols in the workspace, such as functions, types, etc.
|
||||
|
||||
*:ALELint*
|
||||
ALELint *ALELint*
|
||||
|
||||
@ -2568,6 +2685,9 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
|
||||
`initialization_options_callback` may be defined to
|
||||
pass initialization options to the LSP.
|
||||
|
||||
An optional `lsp_config` or `lsp_config_callback` may
|
||||
be defined to pass configuration settings to the LSP.
|
||||
|
||||
`address_callback` A |String| or |Funcref| for a callback function
|
||||
accepting a buffer number. A |String| should be
|
||||
returned with an address to connect to.
|
||||
@ -2628,6 +2748,16 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
|
||||
This can be used in place of `initialization_options`
|
||||
when more complicated processing is needed.
|
||||
|
||||
`lsp_config` A |Dictionary| of configuration settings for LSPs.
|
||||
This will be fed (as JSON) to the LSP in the
|
||||
workspace/didChangeConfiguration command.
|
||||
|
||||
`lsp_config_callback` A |String| or |Funcref| for a callback function
|
||||
accepting a buffer number. A |Dictionary| should be
|
||||
returned for configuration settings to pass the LSP.
|
||||
This can be used in place of `lsp_config` when more
|
||||
complicated processing is needed.
|
||||
|
||||
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.
|
||||
@ -2728,6 +2858,25 @@ ale#linter#PreventLoading(filetype) *ale#linter#PreventLoading()*
|
||||
|runtimepath| for that filetype. This function can be called from vimrc or
|
||||
similar to prevent ALE from loading linters.
|
||||
|
||||
ale#other_source#ShowResults(buffer, linter_name, loclist)
|
||||
*ale#other_source#ShowResults()*
|
||||
|
||||
Show results from another source of information.
|
||||
|
||||
`buffer` must be a valid buffer number, and `linter_name` must be a unique
|
||||
name for identifying another source of information. The `loclist` given
|
||||
where the problems in a buffer are, and should be provided in the format ALE
|
||||
uses for regular linter results. See |ale-loclist-format|.
|
||||
|
||||
|
||||
ale#other_source#StartChecking(buffer, linter_name)
|
||||
*ale#other_source#StartChecking()*
|
||||
|
||||
Tell ALE that another source of information has started checking a buffer.
|
||||
|
||||
`buffer` must be a valid buffer number, and `linter_name` must be a unique
|
||||
name for identifying another source of information.
|
||||
|
||||
|
||||
ale#statusline#Count(buffer) *ale#statusline#Count()*
|
||||
|
||||
@ -2756,10 +2905,21 @@ b:ale_linted *b:ale_linted*
|
||||
echo getbufvar(bufnr(''), 'ale_linted', 0) > 0 ? 'checked' : 'not checked'
|
||||
<
|
||||
|
||||
g:ale_want_results_buffer *g:ale_want_results_buffer*
|
||||
|
||||
`g:ale_want_results_buffer` is set to the number of the buffer being checked
|
||||
when the |ALEWantResults| event is signaled. This variable should be read to
|
||||
figure out which buffer other sources should lint.
|
||||
|
||||
|
||||
ALELintPre *ALELintPre-autocmd*
|
||||
*ALELintPre*
|
||||
ALELintPost *ALELintPost-autocmd*
|
||||
*ALELintPost*
|
||||
ALEFixPre *ALEFixPre-autocmd*
|
||||
*ALEFixPre*
|
||||
ALEFixPost *ALEFixPost-autocmd*
|
||||
*ALEFixPost*
|
||||
|
||||
These |User| autocommands are triggered before and after every lint or fix
|
||||
cycle. They can be used to update statuslines, send notifications, etc.
|
||||
@ -2773,7 +2933,7 @@ ALEFixPost *ALEFixPost-autocmd*
|
||||
autocmd!
|
||||
autocmd User ALELintPre hi Statusline ctermfg=darkgrey
|
||||
autocmd User ALELintPost hi Statusline ctermfg=NONE
|
||||
augroup end
|
||||
augroup END
|
||||
<
|
||||
Or to display the progress in the statusline:
|
||||
>
|
||||
@ -2783,10 +2943,11 @@ ALEFixPost *ALEFixPost-autocmd*
|
||||
autocmd!
|
||||
autocmd User ALELintPre let s:ale_running = 1 | redrawstatus
|
||||
autocmd User ALELintPost let s:ale_running = 0 | redrawstatus
|
||||
augroup end
|
||||
augroup END
|
||||
|
||||
<
|
||||
ALEJobStarted *ALEJobStarted-autocmd*
|
||||
*ALEJobStarted*
|
||||
|
||||
This |User| autocommand is triggered immediately after a job is successfully
|
||||
run. This provides better accuracy for checking linter status with
|
||||
@ -2794,6 +2955,22 @@ ALEJobStarted *ALEJobStarted-autocmd*
|
||||
triggered before any linters are executed.
|
||||
|
||||
|
||||
ALEWantResults *ALEWantResults-autocmd*
|
||||
*ALEWantResults*
|
||||
|
||||
This |User| autocommand is triggered before ALE begins a lint cycle. Another
|
||||
source can respond by calling |ale#other_source#StartChecking()|, and
|
||||
|ALELintPre| will be signaled thereafter, to allow other plugins to know
|
||||
that another source is checking the buffer.
|
||||
|
||||
|g:ale_want_results_buffer| will be set to the number for a buffer being
|
||||
checked when the event is signaled, and deleted after the event is done.
|
||||
This variable should be read to know which buffer to check.
|
||||
|
||||
Other plugins can use this event to start checking buffers when ALE events
|
||||
for checking buffers are triggered.
|
||||
|
||||
|
||||
===============================================================================
|
||||
10. Special Thanks *ale-special-thanks*
|
||||
|
||||
|
Reference in New Issue
Block a user