1
0
mirror of https://github.com/amix/vimrc synced 2025-07-01 12:45:00 +08:00

Updated plugins

This commit is contained in:
Amir
2020-12-04 22:15:32 +01:00
parent e83f5ea2e7
commit a06964dd3b
261 changed files with 6955 additions and 2773 deletions

View File

@ -1,22 +1,36 @@
===============================================================================
ALE C Integration *ale-c-options*
For basic checking of problems with C files, ALE offers the `cc` linter, which
runs either `clang`, or `gcc`. See |ale-c-cc|.
===============================================================================
Global Options
g:ale_c_always_make *g:ale_c_always_make*
*b:ale_c_always_make*
Type: |Number|
Default: `has('unix') && !has('macunix')`
If set to `1`, use `--always-make` for `make`, which means that output will
always be parsed from `make` dry runs with GNU make. BSD `make` does not
support this option, so you probably want to turn this option off when using
a BSD variant.
g:ale_c_build_dir_names *g:ale_c_build_dir_names*
*b:ale_c_build_dir_names*
Type: |List|
Default: `['build', 'bin']`
A list of directory names to be used when searching upwards from cpp
files to discover compilation databases with. For directory named `'foo'`,
ALE will search for `'foo/compile_commands.json'` in all directories on and above
the directory containing the cpp file to find path to compilation database.
This feature is useful for the clang tools wrapped around LibTooling (namely
here, clang-tidy)
A list of directory names to be used when searching upwards from cpp files
to discover compilation databases with. For directory named `'foo'`, ALE
will search for `'foo/compile_commands.json'` in all directories on and
above the directory containing the cpp file to find path to compilation
database. This feature is useful for the clang tools wrapped around
LibTooling (namely here, clang-tidy)
g:ale_c_build_dir *g:ale_c_build_dir*
@ -37,7 +51,7 @@ g:ale_c_build_dir *g:ale_c_build_dir*
g:ale_c_parse_compile_commands *g:ale_c_parse_compile_commands*
*b:ale_c_parse_compile_commands*
Type: |Number|
Default: `0`
Default: `1`
If set to `1`, ALE will parse `compile_commands.json` files to automatically
determine flags for C or C++ compilers. ALE will first search for the
@ -45,9 +59,6 @@ g:ale_c_parse_compile_commands *g:ale_c_parse_compile_commands*
`compile_commands.json` files in the directories for
|g:ale_c_build_dir_names|.
If |g:ale_c_parse_makefile| or |b:ale_c_parse_makefile| is set to `1`, the
output of `make -n` will be preferred over `compile_commands.json` files.
g:ale_c_parse_makefile *g:ale_c_parse_makefile*
*b:ale_c_parse_makefile*
@ -58,24 +69,102 @@ g:ale_c_parse_makefile *g:ale_c_parse_makefile*
set for C or C++ compilers. This can make it easier to determine the correct
build flags to use for different files.
NOTE: When using this option on BSD, you may need to set
|g:ale_c_always_make| to `0`, and `make -n` will not provide consistent
results if binaries have already been built, so use `make clean` when
editing your files.
WARNING: Running `make -n` automatically can execute arbitrary code, even
though it's supposed to be a dry run, so enable this option with care. You
might prefer to use the buffer-local version of the option instead with
|g:ale_pattern_options|, or you own code for checking which project you're
in.
You might want to disable this option if `make -n` takes too long to run for
projects you work on.
If |g:ale_c_parse_compile_commands| or |b:ale_c_parse_compile_commands| is
set to `1`, flags taken from `compile_commands.json` will be preferred over
`make -n` output.
===============================================================================
clang *ale-c-clang*
astyle *ale-c-astyle*
g:ale_c_clang_executable *g:ale_c_clang_executable*
*b:ale_c_clang_executable*
g:ale_c_astyle_executable *g:ale_c_astyle_executable*
*b:ale_c_astyle_executable*
Type: |String|
Default: `'clang'`
Default: `'astyle'`
This variable can be changed to use a different executable for clang.
This variable can be changed to use a different executable for astyle.
g:ale_c_clang_options *g:ale_c_clang_options*
*b:ale_c_clang_options*
g:ale_c_astyle_project_options *g:ale_c_astyle_project_options*
*b:ale_c_astyle_project_options*
Type: |String|
Default: `''`
This variable can be changed to use an option file for project level
configurations. Provide only the filename of the option file that should be
present at the project's root directory.
For example, if .astylrc is specified, the file is searched in the parent
directories of the source file's directory.
===============================================================================
cc *ale-c-cc*
*ale-c-gcc*
*ale-c-clang*
g:ale_c_cc_executable *g:ale_c_cc_executable*
*b:ale_c_cc_executable*
Type: |String|
Default: `'<auto>'`
This variable can be changed to use a different executable for a C compiler.
ALE will try to use `clang` if Clang is available, otherwise ALE will
default to checking C code with `gcc`.
g:ale_c_cc_options *g:ale_c_cc_options*
*b:ale_c_cc_options*
Type: |String|
Default: `'-std=c11 -Wall'`
This variable can be changed to modify flags given to clang.
This variable can be change to modify flags given to the C compiler.
===============================================================================
ccls *ale-c-ccls*
g:ale_c_ccls_executable *g:ale_c_ccls_executable*
*b:ale_c_ccls_executable*
Type: |String|
Default: `'ccls'`
This variable can be changed to use a different executable for ccls.
g:ale_c_ccls_init_options *g:ale_c_ccls_init_options*
*b:ale_c_ccls_init_options*
Type: |Dictionary|
Default: `{}`
This variable can be changed to customize ccls initialization options.
Example: >
{
\ 'cacheDirectory': '/tmp/ccls',
\ 'cacheFormat': 'binary',
\ 'diagnostics': {
\ 'onOpen': 0,
\ 'opChange': 1000,
\ },
\ }
<
Visit https://github.com/MaskRay/ccls/wiki/Initialization-options for all
available options and explanations.
===============================================================================
@ -260,25 +349,6 @@ g:ale_c_flawfinder_error_severity *g:ale_c_flawfinder_error_severity*
error. This setting also applies to flawfinder for c++.
===============================================================================
gcc *ale-c-gcc*
g:ale_c_gcc_executable *g:ale_c_gcc_executable*
*b:ale_c_gcc_executable*
Type: |String|
Default: `'gcc'`
This variable can be changed to use a different executable for gcc.
g:ale_c_gcc_options *g:ale_c_gcc_options*
*b:ale_c_gcc_options*
Type: |String|
Default: `'-std=c11 -Wall'`
This variable can be change to modify flags given to gcc.
===============================================================================
uncrustify *ale-c-uncrustify*
@ -298,36 +368,5 @@ g:ale_c_uncrustify_options *g:ale_c_uncrustify_options*
This variable can be change to modify flags given to uncrustify.
===============================================================================
ccls *ale-c-ccls*
g:ale_c_ccls_executable *g:ale_c_ccls_executable*
*b:ale_c_ccls_executable*
Type: |String|
Default: `'ccls'`
This variable can be changed to use a different executable for ccls.
g:ale_c_ccls_init_options *g:ale_c_ccls_init_options*
*b:ale_c_ccls_init_options*
Type: |Dictionary|
Default: `{}`
This variable can be changed to customize ccls initialization options.
Example: >
{
\ 'cacheDirectory': '/tmp/ccls',
\ 'cacheFormat': 'binary',
\ 'diagnostics': {
\ 'onOpen': 0,
\ 'opChange': 1000,
\ },
\ }
<
Visit https://github.com/MaskRay/ccls/wiki/Initialization-options for all
available options and explanations.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@ -1,12 +1,16 @@
===============================================================================
ALE C++ Integration *ale-cpp-options*
For basic checking of problems with C++ files, ALE offers the `cc` linter,
which runs either `clang++`, or `gcc`. See |ale-cpp-cc|.
===============================================================================
Global Options
The following C options also apply to some C++ linters too.
* |g:ale_c_always_make|
* |g:ale_c_build_dir_names|
* |g:ale_c_build_dir|
* |g:ale_c_parse_makefile|
@ -14,41 +18,82 @@ The following C options also apply to some C++ linters too.
===============================================================================
clang *ale-cpp-clang*
astyle *ale-cpp-astyle*
g:ale_cpp_clang_executable *g:ale_cpp_clang_executable*
*b:ale_cpp_clang_executable*
g:ale_cpp_astyle_executable *g:ale_cpp_astyle_executable*
*b:ale_cpp_astyle_executable*
Type: |String|
Default: `'clang++'`
Default: `'astyle'`
This variable can be changed to use a different executable for clang.
This variable can be changed to use a different executable for astyle.
g:ale_cpp_clang_options *g:ale_cpp_clang_options*
*b:ale_cpp_clang_options*
Type: |String|
Default: `'-std=c++14 -Wall'`
This variable can be changed to modify flags given to clang.
===============================================================================
clangd *ale-cpp-clangd*
g:ale_cpp_clangd_executable *g:ale_cpp_clangd_executable*
*b:ale_cpp_clangd_executable*
Type: |String|
Default: `'clangd'`
This variable can be changed to use a different executable for clangd.
g:ale_cpp_clangd_options *g:ale_cpp_clangd_options*
*b:ale_cpp_clangd_options*
g:ale_cpp_astyle_project_options *g:ale_cpp_astyle_project_options*
*b:ale_cpp_astyle_project_options*
Type: |String|
Default: `''`
This variable can be changed to modify flags given to clangd.
This variable can be changed to use an option file for project level
configurations. Provide only the filename of the option file that should be
present at the project's root directory.
For example, if .astylrc is specified, the file is searched in the parent
directories of the source file's directory.
===============================================================================
cc *ale-cpp-cc*
*ale-cpp-gcc*
*ale-cpp-clang*
g:ale_cpp_cc_executable *g:ale_cpp_cc_executable*
*b:ale_cpp_cc_executable*
Type: |String|
Default: `'<auto>'`
This variable can be changed to use a different executable for a C++ compiler.
ALE will try to use `clang++` if Clang is available, otherwise ALE will
default to checking C++ code with `gcc`.
g:ale_cpp_cc_options *g:ale_cpp_cc_options*
*b:ale_cpp_cc_options*
Type: |String|
Default: `'-std=c++14 -Wall'`
This variable can be change to modify flags given to the C++ compiler.
===============================================================================
ccls *ale-cpp-ccls*
g:ale_cpp_ccls_executable *g:ale_cpp_ccls_executable*
*b:ale_cpp_ccls_executable*
Type: |String|
Default: `'ccls'`
This variable can be changed to use a different executable for ccls.
g:ale_cpp_ccls_init_options *g:ale_cpp_ccls_init_options*
*b:ale_cpp_ccls_init_options*
Type: |Dictionary|
Default: `{}`
This variable can be changed to customize ccls initialization options.
Example: >
{
\ 'cacheDirectory': '/tmp/ccls',
\ 'cacheFormat': 'binary',
\ 'diagnostics': {
\ 'onOpen': 0,
\ 'opChange': 1000,
\ },
\ }
<
Visit https://github.com/MaskRay/ccls/wiki/Initialization-options for all
available options and explanations.
===============================================================================
@ -82,6 +127,25 @@ g:ale_cpp_clangcheck_options *g:ale_cpp_clangcheck_options*
option.
===============================================================================
clangd *ale-cpp-clangd*
g:ale_cpp_clangd_executable *g:ale_cpp_clangd_executable*
*b:ale_cpp_clangd_executable*
Type: |String|
Default: `'clangd'`
This variable can be changed to use a different executable for clangd.
g:ale_cpp_clangd_options *g:ale_cpp_clangd_options*
*b:ale_cpp_clangd_options*
Type: |String|
Default: `''`
This variable can be changed to modify flags given to clangd.
===============================================================================
clang-format *ale-cpp-clangformat*
@ -271,61 +335,11 @@ g:ale_cpp_flawfinder_options *g:ale-cpp-flawfinder*
This variable can be used to pass extra options into the flawfinder command.
===============================================================================
gcc *ale-cpp-gcc*
g:ale_cpp_gcc_executable *g:ale_cpp_gcc_executable*
*b:ale_cpp_gcc_executable*
Type: |String|
Default: `'gcc'`
This variable can be changed to use a different executable for gcc.
g:ale_cpp_gcc_options *g:ale_cpp_gcc_options*
*b:ale_cpp_gcc_options*
Type: |String|
Default: `'-std=c++14 -Wall'`
This variable can be changed to modify flags given to gcc.
===============================================================================
uncrustify *ale-cpp-uncrustify*
See |ale-c-uncrustify| for information about the available options.
===============================================================================
ccls *ale-cpp-ccls*
g:ale_cpp_ccls_executable *g:ale_cpp_ccls_executable*
*b:ale_cpp_ccls_executable*
Type: |String|
Default: `'ccls'`
This variable can be changed to use a different executable for ccls.
g:ale_cpp_ccls_init_options *g:ale_cpp_ccls_init_options*
*b:ale_cpp_ccls_init_options*
Type: |Dictionary|
Default: `{}`
This variable can be changed to customize ccls initialization options.
Example: >
{
\ 'cacheDirectory': '/tmp/ccls',
\ 'cacheFormat': 'binary',
\ 'diagnostics': {
\ 'onOpen': 0,
\ 'opChange': 1000,
\ },
\ }
<
Visit https://github.com/MaskRay/ccls/wiki/Initialization-options for all
available options and explanations.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@ -13,6 +13,7 @@ CONTENTS *ale-development-contents*
4. Testing ALE..........................|ale-development-tests|
4.1. Writing Linter Tests.............|ale-development-linter-tests|
4.2. Writing Fixer Tests..............|ale-development-fixer-tests|
4.3. Running Tests in a Windows VM....|ale-development-windows-tests|
===============================================================================
1. Introduction *ale-development-introduction*
@ -170,6 +171,11 @@ will run all of the tests in Vader, Vint checks, and several Bash scripts for
finding extra issues. Run `./run-tests --help` to see all of the options the
script supports. Note that the script supports selecting particular test files.
Once you get used to dealing with Vim and NeoVim compatibility issues, you
probably want to use `./run-tests --fast -q` for running tests with only the
fastest available Vim version, and with success messages from tests
suppressed.
Generally write tests for any changes you make. The following types of tests
are recommended for the following types of code.
@ -353,5 +359,81 @@ given the above setup are as follows.
`AssertFixerNotExecuted` - Check that fixers will not be executed.
===============================================================================
4.3 Running Tests in a Windows VM *ale-development-windows-tests*
Tests are run for ALE in a build of Vim 8 for Windows via AppVeyor. These
tests can frequently break due to minor differences in paths and how escaping
is done for commands on Windows. If you are a Linux or Mac user, running these
tests locally can be difficult. Here is a process that will make that easier.
First, you want to install a Windows image with VirtualBox. Install VirtualBox
and grab a VirtualBox image for Windows such as from here:
https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
NOTE: If you need to enter a password for the virtual machine at any point,
the password is "Passw0rd!" without the double quotes.
NOTE: If your trial period for Windows runs out, run the commands like the
wallpaper tells you to.
Your virtual machine will need to have PowerShell installed. Before you go any
further, confirm that PowerShell is installed in your Windows virtual machine.
Consult the VirtualBox documentation on how to install "Guest Additions."
You probably want to install "Guest Additions" for most things to work
properly.
After you've loaded your virtual machine image, go into "Settings" for your
virtual machine, and "Shared Folders." Add a shared folder with the name
"ale", and set the "Folder Path" to the path to your ALE repository, for
example: "/home/w0rp/ale"
Find out which drive letter "ale" has been mounted as in Windows. We'll use
"E:" as the drive letter, for example. Open the command prompt as an
administrator by typing in `cmd` in the start menu, right clicking on the
command prompt application, and clicking "Run as administrator." Click "Yes"
when prompted to ask if you're sure you want to run the command prompt. You
should type in the following command to mount the "ale" directory for testing,
where "E:" is replaced with your drive letter. >
mklink /D C:\testplugin E:
<
Close the administrator Command Prompt, and try running the command
`type C:\testplugin\LICENSE` in a new Command Prompt which you are NOT running
as administrator. You should see the license for ALE in your terminal. After
you have confirmed that you have mounted ALE on your machine, search in the
Start Menu for "power shell," run PowerShell as an administrator, and issue
the following commands to install the correct Vim and Vader versions for
running tests. >
Add-Type -A System.IO.Compression.FileSystem
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586w32.zip -OutFile C:\vim.zip
[IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim')
rm C:\vim.zip
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586rt.zip -OutFile C:\rt.zip
[IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim')
rm C:\rt.zip
Invoke-WebRequest https://github.com/junegunn/vader.vim/archive/c6243dd81c98350df4dec608fa972df98fa2a3af.zip -OutFile C:\vader.zip
[IO.Compression.ZipFile]::ExtractToDirectory('C:\vader.zip', 'C:\')
mv C:\vader.vim-c6243dd81c98350df4dec608fa972df98fa2a3af C:\vader
rm C:\vader.zip
<
After you have finished installing everything, you can run all of the tests
in Windows by opening a Command Prompt NOT as an administrator by navigating
to the directory where you've mounted the ALE code, which must be named
`C:\testplugin`, and by running the `run-tests.bat` batch file. >
cd C:\testplugin
run-tests
<
It will probably take several minutes for all of the tests to run. Be patient.
You can run a specific test by passing the filename as an argument to the
batch file, for example: `run-tests test/test_c_flag_parsing.vader` . This will
give you results much more quickly.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@ -6,7 +6,7 @@ ALE Elixir Integration *ale-elixir-options*
mix *ale-elixir-mix*
The `mix` linter is disabled by default, as it can bee too expensive to run.
The `mix` linter is disabled by default, as it can be too expensive to run.
See `:help g:ale_linters`

View File

@ -31,6 +31,18 @@ g:ale_erlang_dialyzer_rebar3_profile *g:ale_erlang_dialyzer_rebar3_profile*
This variable can be changed to specify the profile that is used to
run dialyzer with rebar3.
-------------------------------------------------------------------------------
elvis *ale-erlang-elvis*
g:ale_erlang_elvis_executable *g:ale_erlang_elvis_executable*
*b:ale_erlang_elvis_executable*
Type: |String|
Default: `'elvis'`
This variable can be changed to specify the elvis executable.
-------------------------------------------------------------------------------
erlc *ale-erlang-erlc*

View File

@ -14,7 +14,8 @@ ember-template-lint *ale-handlebars-embertemplatelint*
g:ale_handlebars_embertemplatelint_executable
*g:ale_handlebars_embertemplatelint_executable*
Type: |String| *b:ale_handlebars_embertemplatelint_executable*
*b:ale_handlebars_embertemplatelint_executable*
Type: |String|
Default: `'ember-template-lint'`
See |ale-integrations-local-executables|
@ -22,7 +23,8 @@ g:ale_handlebars_embertemplatelint_executable
g:ale_handlebars_embertemplatelint_use_global
*g:ale_handlebars_embertemplatelint_use_global*
Type: |Number| *b:ale_handlebars_embertemplatelint_use_global*
*b:ale_handlebars_embertemplatelint_use_global*
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|

View File

@ -172,5 +172,25 @@ g:ale_haskell_hie_executable *g:ale_haskell_hie_executable*
ide engine. i.e. `'hie-wrapper'`
===============================================================================
ormolu *ale-haskell-ormolu*
g:ale_haskell_ormolu_executable *g:ale_haskell_ormolu_executable*
*b:ale_haskell_ormolu_executable*
Type: |String|
Default: `'ormolu'`
This variable can be changed to use a different executable for ormolu.
g:ale_haskell_ormolu_options *g:ale_haskell_ormolu_options*
*b:ale_haskell_ormolu_options*
Type: String
Default: ''
This variable can be used to pass extra options to the underlying ormolu
executable.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@ -131,18 +131,26 @@ javalsp *ale-java-javalsp*
To enable Java LSP linter you need to download and build the vscode-javac
language server from https://github.com/georgewfraser/java-language-server.
Simply download the source code and then build a distribution:
scripts/link_mac.sh
Before building the language server you need to install pre-requisites: npm,
maven, and protobuf. You also need to have Java 13 and JAVA_HOME properly
set.
or
After downloading the source code and installing all pre-requisites you can
build the language server with the included build.sh script:
scripts/link_windows.sh
scripts/build.sh
This generates a dist/mac or dist/windows directory that contains the
language server. To let ALE use this language server you need to set the
This will create launch scripts for Linux, Mac, and Windows in the dist folder
within the repo:
- lang_server_linux.sh
- lang_server_mac.sh
- lang_server_windows.sh
To let ALE use this language server you need to set the
g:ale_java_javalsp_executable variable to the absolute path of the launcher
executable in this directory.
executable for your platform.
g:ale_java_javalsp_executable *g:ale_java_javalsp_executable*
*b:ale_java_javalsp_executable*
@ -152,7 +160,7 @@ g:ale_java_javalsp_executable *g:ale_java_javalsp_executable*
This variable must be set to the absolute path of the language server launcher
executable. For example:
>
let g:ale_java_javalsp_executable=/java-language-server/dist/mac/bin/launcher
let g:ale_java_javalsp_executable=/java-language-server/dist/lang_server_linux.sh
<
g:ale_java_javalsp_config *g:ale_java_javalsp_config*
@ -164,7 +172,7 @@ The javalsp linter automatically detects external depenencies for Maven and
Gradle projects. In case the javalsp fails to detect some of them, you can
specify them setting a dictionary to |g:ale_java_javalsp_config| variable.
>
let g:ale_java_javalsp_executable =
let g:ale_java_javalsp_config =
\ {
\ 'java': {
\ 'externalDependencies': [

View File

@ -138,7 +138,7 @@ g:ale_javascript_flow_use_respect_pragma
By default, ALE will use the `--respect-pragma` option for `flow`, so only
files with the `@flow` pragma are checked by ALE. This option can be set to
`0` to disable that behaviour, so all files can be checked by `flow`.
`0` to disable that behavior, so all files can be checked by `flow`.
===============================================================================

View File

@ -30,5 +30,21 @@ g:ale_lua_luacheck_options *g:ale_lua_luacheck_options*
This variable can be set to pass additional options to luacheck.
===============================================================================
luafmt *ale-lua-luafmt*
g:ale_lua_luafmt_executable *g:ale_lua_luafmt_executable*
*b:ale_lua_luafmt_executable*
Type: |String|
Default: `'luafmt'`
This variable can be set to use a different executable for luafmt.
g:ale_lua_luafmt_options *g:ale_lua_luafmt_options*
*b:ale_lua_luafmt_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to the luafmt fixer.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@ -2,6 +2,17 @@
ALE Markdown Integration *ale-markdown-options*
===============================================================================
markdownlint *ale-markdown-markdownlint*
g:ale_markdown_markdownlint_options *g:ale_markdown_markdownlint_options*
*b:ale_markdown_markdownlint_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to markdownlint.
===============================================================================
mdl *ale-markdown-mdl*

View File

@ -85,6 +85,14 @@ g:ale_php_phpcbf_use_global *g:ale_php_phpcbf_use_global*
See |ale-integrations-local-executables|
g:ale_php_phpcbf_options *g:ale_php_phpcbf_options*
*b:ale_php_phpcbf_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to php-cbf
===============================================================================
phpcs *ale-php-phpcs*
@ -189,46 +197,124 @@ g:ale_php_psalm_executable *g:ale_php_psalm_executable*
This variable sets the executable used for psalm.
g:ale_psalm_langserver_options *g:ale_psalm_langserver_options*
*b:ale_psalm_langserver_options*
g:ale_php_psalm_options *g:ale_php_psalm_options*
*b:ale_php_psalm_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to psalm.
===============================================================================
php-cs-fixer *ale-php-php-cs-fixer*
g:ale_php_cs_fixer_executable *g:ale_php_cs_fixer_executable*
*b:ale_php_cs_fixer_executable*
g:ale_php_psalm_use_global *g:ale_php_psalm_use_global*
*b:ale_php_psalm_use_global*
Type: |Boolean|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
===============================================================================
php-cs-fixer *ale-php-php-cs-fixer*
g:ale_php_cs_fixer_executable *g:ale_php_cs_fixer_executable*
*b:ale_php_cs_fixer_executable*
Type: |String|
Default: `'php-cs-fixer'`
This variable sets executable used for php-cs-fixer.
g:ale_php_cs_fixer_use_global *g:ale_php_cs_fixer_use_global*
*b:ale_php_cs_fixer_use_global*
Type: |Boolean|
Default: `get(g:, 'ale_use_global_executables', 0)`
This variable force globally installed fixer.
g:ale_php_cs_fixer_options *g:ale_php_cs_fixer_options*
*b:ale_php_cs_fixer_options*
g:ale_php_cs_fixer_options *g:ale_php_cs_fixer_options*
*b:ale_php_cs_fixer_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to php-cs-fixer.
===============================================================================
php *ale-php-php*
g:ale_php_php_executable *g:ale_php_php_executable*
*b:ale_php_php_executable*
g:ale_php_cs_fixer_use_global *g:ale_php_cs_fixer_use_global*
*b:ale_php_cs_fixer_use_global*
Type: |Boolean|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
===============================================================================
php *ale-php-php*
g:ale_php_php_executable *g:ale_php_php_executable*
*b:ale_php_php_executable*
Type: |String|
Default: `'php'`
This variable sets the executable used for php.
===============================================================================
tlint *ale-php-tlint*
g:ale_php_tlint_executable *g:ale_php_tlint_executable*
*b:ale_php_tlint_executable*
Type: |String|
Default: `'tlint'`
See |ale-integrations-local-executables|
g:ale_php_tlint_use_global *g:ale_php_tlint_use_global*
*b:ale_php_tlint_use_global*
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
g:ale_php_tlint_options *g:ale_php_tlint_options*
*b:ale_php_tlint_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to tlint
===============================================================================
intelephense *ale-php-intelephense*
g:ale_php_intelephense_executable *g:ale_php_intelephense_executable*
*b:ale_php_intelephense_executable*
Type: |String|
Default: `'intelephense'`
The variable can be set to configure the executable that will be used for
running the intelephense language server. `node_modules` directory
executable will be preferred instead of this setting if
|g:ale_php_intelephense_use_global| is `0`.
See: |ale-integrations-local-executables|
g:ale_php_intelephense_use_global *g:ale_php_intelephense_use_global*
*b:ale_php_intelephense_use_global*
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
This variable can be set to `1` to force the language server to be run with
the executable set for |g:ale_php_intelephense_executable|.
See: |ale-integrations-local-executables|
g:ale_php_intelephense_config *g:ale_php_intelephense_config*
*b:ale_php_intelephense_config*
Type: |Dictionary|
Default: `{}`
The initialization options config specified by Intelephense. Refer to the
installation docs provided by intelephense (github.com/bmewburn/intelephense
-docs).
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@ -25,13 +25,6 @@ Installation
Install PSScriptAnalyzer by any means, so long as it can be automatically
imported in PowerShell.
Some PowerShell plugins set the filetype of files to `ps1`. To continue using
these plugins, use the ale_linter_aliases global to alias `ps1` to `powershell`
>
" Allow ps1 filetype to work with powershell linters
let g:ale_linter_aliases = {'ps1': 'powershell'}
<
g:ale_powershell_psscriptanalyzer_executable
*g:ale_powershell_psscriptanalyzer_executable*

View File

@ -41,6 +41,32 @@ ALE will look for configuration files with the following filenames. >
The first directory containing any of the files named above will be used.
===============================================================================
autoimport *ale-python-autoimport*
g:ale_python_autoimport_executable *g:ale_python_autoimport_executable*
*b:ale_python_autoimport_executable*
Type: |String|
Default: `'autoimport'`
See |ale-integrations-local-executables|
g:ale_python_autoimport_options *g:ale_python_autoimport_options*
*b:ale_python_autoimport_options*
Type: |String|
Default: `''`
This variable can be set to pass extra options to autoimport.
g:ale_python_autoimport_use_global *g:ale_python_autoimport_use_global*
*b:ale_python_autoimport_use_global*
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
===============================================================================
autopep8 *ale-python-autopep8*
@ -169,13 +195,14 @@ flake8 *ale-python-flake8*
g:ale_python_flake8_change_directory *g:ale_python_flake8_change_directory*
*b:ale_python_flake8_change_directory*
Type: |Number|
Default: `1`
Type: |String|
Default: `project`
If set to `1`, ALE will switch to the directory the Python file being
checked with `flake8` is in before checking it. This helps `flake8` find
configuration files more easily. This option can be turned off if you want
to control the directory Python is executed from yourself.
If set to `project`, ALE will switch to the project root before checking file.
If set to `file`, ALE will switch to directory the Python file being
checked with `flake8` is in before checking it.
You can turn it off with `off` option if you want to control the directory
Python is executed from yourself.
g:ale_python_flake8_executable *g:ale_python_flake8_executable*
@ -598,6 +625,7 @@ g:ale_python_pylint_use_msg_id *g:ale_python_pylint_use_msg_id*
Use message for output (e.g. I0011) instead of symbolic name of the message
(e.g. locally-disabled).
===============================================================================
pyls *ale-python-pyls*
@ -682,6 +710,65 @@ g:ale_python_pyre_auto_pipenv *g:ale_python_pyre_auto_pipenv*
if true. This is overridden by a manually-set executable.
===============================================================================
pyright *ale-python-pyright*
The `pyright` linter requires a recent version of `pyright` which includes
the `pyright-langserver` executable. You can install `pyright` on your system
through `npm` with `sudo npm install -g pyright` or similar.
Refer to their README for installation instructions:
https://github.com/Microsoft/pyright
`pyright` needs to know the path to your Python executable and probably a
virtualenv to run. ALE will try to detect these automatically.
See |g:ale_python_pyright_config|.
g:ale_python_pyright_executable *g:ale_python_pyright_executable*
*b:ale_python_pyright_executable*
Type: |String|
Default: `'pyright-langserver'`
The executable for running `pyright`, which is typically installed globally.
g:ale_python_pyright_config *g:ale_python_pyright_config*
*b:ale_python_pyright_config*
Type: |Dictionary|
Default: `{}`
Settings for configuring the `pyright` language server.
See pyright's documentation for a full list of options:
https://github.com/microsoft/pyright/blob/master/docs/settings.md
ALE will automatically try to set defaults for `venvPath` and `pythonPath`
so your project can automatically be checked with the right libraries.
You can override these settings with whatever you want in your ftplugin
file like so: >
let b:ale_python_pyright_config = {
\ 'python': {
\ 'pythonPath': '/bin/python',
\ 'venvPath': '/other/dir',
\ },
\}
<
If `venvPath` is set, but `pythonPath` is not,
ALE will use `venvPath . '/bin/python'` or similar as `pythonPath`.
A commonly used setting for `pyright` is disabling language services
apart from type checking and "hover" (|ale-hover|), you can set this
setting like so, or use whatever other settings you want: >
let b:ale_python_pyright_config = {
\ 'pyright': {
\ 'disableLanguageServices': v:true,
\ },
\}
<
===============================================================================
reorder-python-imports *ale-python-reorder_python_imports*

View File

@ -2,6 +2,29 @@
ALE R Integration *ale-r-options*
===============================================================================
languageserver *ale-r-languageserver*
g:ale_r_languageserver_cmd *g:ale_r_languageserver_cmd*
*b:ale_r_languageserver_cmd*
Type: |String|
Default: `'languageserver::run()'`
This option can be configured to change the execution command for
languageserver.
See the languageserver documentation for more options.
g:ale_r_languageserver_config *g:ale_r_languageserver_config*
*b:ale_r_languageserver_config*
Type: |Dictionary|
Default: `{}`
This option can be configured to change settings for languageserver. See the
languageserver documentation for more information.
===============================================================================
lintr *ale-r-lintr*
@ -22,7 +45,7 @@ g:ale_r_lintr_lint_package *g:ale_r_lintr_lint_package*
Default: `0`
When set to `1`, the file will be checked with `lintr::lint_package` instead
of `lintr::lint`. This prevents erroneous namespace warnings when linting
of `lintr::lint`. This prevents erroneous namespace warnings when linting
package files.
@ -36,8 +59,8 @@ g:ale_r_styler_options *g:ale_r_styler_options*
This option can be configured to change the options for styler.
The value of this option will be used as the `style` argument for the
`styler::style_file` options. Consult the styler documentation
The value of this option will be used as the `style` argument for the
`styler::style_file` options. Consult the styler documentation
for more information.

View File

@ -114,6 +114,14 @@ g:ale_ruby_rubocop_options *g:ale_ruby_rubocop_options*
This variable can be changed to modify flags given to rubocop.
g:ale_ruby_rubocop_auto_correct_all *g:ale_ruby_rubocop_auto_correct_all*
*b:ale_ruby_rubocop_auto_correct_all*
Type: Number
Default: `0`
This variable can be changed to make rubocop to correct all offenses (unsafe).
===============================================================================
ruby *ale-ruby-ruby*
@ -172,8 +180,8 @@ g:ale_ruby_sorbet_options *g:ale_ruby_sorbet_options*
===============================================================================
standardrb *ale-ruby-standardrb*
g:ale_ruby_standardrb_executable *g:ale_ruby_standardrb_executable*
*b:ale_ruby_standardrb_executable*
g:ale_ruby_standardrb_executable *g:ale_ruby_standardrb_executable*
*b:ale_ruby_standardrb_executable*
Type: String
Default: `'standardrb'`

View File

@ -22,20 +22,20 @@ Integration Information
3. rls -- If you have `rls` installed, you might prefer using this linter
over cargo. rls implements the Language Server Protocol for incremental
compilation of Rust code, and can check Rust files while you type. `rls`
requires Rust files to contained in Cargo projects.
requires Rust files to be contained in Cargo projects.
4. analyzer -- If you have rust-analyzer installed, you might prefer using
this linter over cargo and rls. rust-analyzer also implements the
Language Server Protocol for incremental compilation of Rust code, and is
the next iteration of rls. rust-analyzer, like rls, requires Rust files
to contained in Cargo projects.
to be contained in Cargo projects.
5. rustfmt -- If you have `rustfmt` installed, you can use it as a fixer to
consistently reformat your Rust code.
Only cargo is enabled by default. To switch to using rustc instead of cargo,
configure |g:ale_linters| appropriately: >
Only cargo and rls are enabled by default. To switch to using rustc instead
of cargo, configure |g:ale_linters| appropriately: >
" See the help text for the option for more information.
let g:ale_linters = {'rust': ['rustc']}
let g:ale_linters = {'rust': ['rustc', 'rls']}
<
Also note that rustc 1.12. or later is needed.
@ -60,6 +60,7 @@ g:ale_rust_analyzer_config *g:ale_rust_analyzer_config*
Dictionary with configuration settings for rust-analyzer.
===============================================================================
cargo *ale-rust-cargo*
@ -174,6 +175,18 @@ g:ale_rust_cargo_clippy_options
only `cargo clippy` supports (e.g. `--deny`).
g:ale_rust_cargo_target_dir
*g:ale_rust_cargo_target_dir*
*b:ale_rust_cargo_target_dir*
Type: |String|
Default: `''`
Use a custom target directory when running the commands for ALE. This can
help to avoid "waiting for file lock on build directory" messages when
running `cargo` commands manually while ALE is performing its checks.
===============================================================================
rls *ale-rust-rls*
@ -240,23 +253,25 @@ 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: >
When set to 1, instructs the Rust error reporting 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
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
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*

View File

@ -2,6 +2,29 @@
ALE Shell Integration *ale-sh-options*
===============================================================================
bashate *ale-sh-bashate*
g:ale_sh_bashate_executable *g:ale_sh_bashate_executable*
*b:ale_sh_bashate_executable*
Type: |String|
Default: `'bashate'`
This variable sets executable used for bashate.
g:ale_sh_bashate_options *g:ale_sh_bashate_options*
*b:ale_sh_bashate_options*
Type: |String|
Default: `''`
With this variable we are able to pass extra arguments for bashate. For
example to ignore the indentation rule:
>
let g:ale_sh_bashate_options = '-i E003'
<
===============================================================================
sh-language-server *ale-sh-language-server*

View File

@ -3,7 +3,7 @@ ALE SQL Integration *ale-sql-options*
===============================================================================
pgformatter *ale-sql-pgformatter*
pgformatter *ale-sql-pgformatter*
g:ale_sql_pgformatter_executable *g:ale_sql_pgformatter_executable*
*b:ale_sql_pgformatter_executable*

View File

@ -21,6 +21,7 @@ Notes:
* `drafter`
* AsciiDoc
* `alex`!!
* `languagetool`!!
* `proselint`
* `redpen`
* `textlint`
@ -31,6 +32,7 @@ Notes:
* Awk
* `gawk`
* Bash
* `bashate`
* `language-server`
* `shell` (-n flag)
* `shellcheck`
@ -44,8 +46,9 @@ Notes:
* `shellcheck`
* `shfmt`
* C
* `astyle`
* `ccls`
* `clang`
* `clang` (`cc`)
* `clangd`
* `clang-format`
* `clangtidy`!!
@ -53,7 +56,7 @@ Notes:
* `cpplint`!!
* `cquery`
* `flawfinder`
* `gcc`
* `gcc` (`cc`)
* `uncrustify`
* C#
* `csc`!!
@ -61,8 +64,9 @@ Notes:
* `mcsc`!!
* `uncrustify`
* C++ (filetype cpp)
* `astyle`
* `ccls`
* `clang`
* `clang` (`cc`)
* `clangcheck`!!
* `clangd`
* `clang-format`
@ -72,7 +76,7 @@ Notes:
* `cpplint`!!
* `cquery`
* `flawfinder`
* `gcc`
* `gcc` (`cc`)
* `uncrustify`
* Chef
* `cookstyle`
@ -115,6 +119,8 @@ Notes:
* `dartanalyzer`!!
* `dartfmt`!!
* `language_server`
* Dhall
* `dhall-format`
* Dockerfile
* `dockerfile_lint`
* `hadolint`
@ -134,6 +140,7 @@ Notes:
* `erubis`
* `ruumba`
* Erlang
* `elvis`!!
* `erlc`
* `SyntaxErl`
* Fish
@ -189,6 +196,7 @@ Notes:
* `hie`
* `hindent`
* `hlint`
* `ormolu`
* `stack-build`!!
* `stack-ghc`
* `stylish-haskell`
@ -259,6 +267,7 @@ Notes:
* Lua
* `luac`
* `luacheck`
* `luafmt`
* Mail
* `alex`!!
* `languagetool`!!
@ -318,6 +327,7 @@ Notes:
* Perl6
* `perl6 -c`
* PHP
* `intelephense`
* `langserver`
* `phan`
* `phpcbf`
@ -327,6 +337,7 @@ Notes:
* `phpmd`
* `phpstan`
* `psalm`!!
* `tlint`
* PO
* `alex`!!
* `msgfmt`
@ -355,6 +366,7 @@ Notes:
* `purescript-language-server`
* `purty`
* Python
* `autoimport`
* `autopep8`
* `bandit`
* `black`
@ -369,6 +381,7 @@ Notes:
* `pylint`!!
* `pyls`
* `pyre`
* `pyright`
* `reorder-python-imports`
* `vulture`!!
* `yapf`
@ -376,6 +389,7 @@ Notes:
* `qmlfmt`
* `qmllint`
* R
* `languageserver`
* `lintr`
* `styler`
* Racket
@ -442,11 +456,13 @@ Notes:
* `sqlfmt`
* `sqlformat`
* `sqlint`
* `sql-lint`
* Stylus
* `stylelint`
* SugarSS
* `stylelint`
* Swift
* Apple `swift-format`
* `sourcekit-lsp`
* `swiftformat`
* `swiftlint`
@ -480,6 +496,7 @@ Notes:
* VALA
* `uncrustify`
* Verilog
* `hdl-checker`
* `iverilog`
* `verilator`
* `vlog`
@ -507,6 +524,9 @@ Notes:
* YAML
* `prettier`
* `swaglint`
* `yamlfix`
* `yamllint`
* YANG
* `yang-lsp`
* Zig
* `zls`

View File

@ -3,7 +3,10 @@ ALE Verilog/SystemVerilog Integration *ale-verilog-options*
===============================================================================
ALE can use four different linters for Verilog HDL:
ALE can use five different linters for Verilog HDL:
HDL Checker
Using `hdl_checker --lsp`
iverilog:
Using `iverilog -t null -Wall`
@ -26,6 +29,9 @@ defining 'g:ale_linters' variable:
\ let g:ale_linters = {'systemverilog' : ['verilator'],}
<
===============================================================================
General notes
Linters/compilers that utilize a "work" directory for analyzing designs- such
as ModelSim and Vivado- can be passed the location of these directories as
part of their respective option strings listed below. This is useful for
@ -40,6 +46,16 @@ changing. This can happen in the form of hangs or crashes. To help prevent
this when using these linters, it may help to run linting less frequently; for
example, only when a file is saved.
HDL Checker is an alternative for some of the issues described above. It wraps
around ghdl, Vivado and ModelSim/Questa and, when using the latter, it can
handle mixed language (VHDL, Verilog, SystemVerilog) designs.
===============================================================================
hdl-checker *ale-verilog-hdl-checker*
See |ale-vhdl-hdl-checker|
===============================================================================
iverilog *ale-verilog-iverilog*

View File

@ -3,10 +3,10 @@ ALE VHDL Integration *ale-vhdl-options*
===============================================================================
ALE can use three different linters for VHDL:
ALE can use four different linters for VHDL:
iverilog:
Using `iverilog -t null -Wall`
ghdl:
Using `ghdl --std=08`
ModelSim/Questa
Using `vcom -2008 -quiet -lint`
@ -14,8 +14,15 @@ ALE can use three different linters for VHDL:
Vivado
Using `xvhdl --2008`
Note all linters default to VHDL-2008 support. This, and other options, can be
changed with each linter's respective option variable.
HDL Checker
Using `hdl_checker --lsp`
===============================================================================
General notes
ghdl, ModelSim/Questa and Vivado linters default to VHDL-2008 support. This,
and other options, can be changed with each linter's respective option
variable.
Linters/compilers that utilize a "work" directory for analyzing designs- such
as ModelSim and Vivado- can be passed the location of these directories as
@ -31,6 +38,10 @@ changing. This can happen in the form of hangs or crashes. To help prevent
this when using these linters, it may help to run linting less frequently; for
example, only when a file is saved.
HDL Checker is an alternative for some of the issues described above. It wraps
around ghdl, Vivado and ModelSim/Questa and, when using the latter, it can
handle mixed language (VHDL, Verilog, SystemVerilog) designs.
===============================================================================
ghdl *ale-vhdl-ghdl*
@ -50,6 +61,60 @@ g:ale_vhdl_ghdl_options *g:ale_vhdl_ghdl_options*
This variable can be changed to modify the flags/options passed to 'ghdl'.
===============================================================================
hdl-checker *ale-vhdl-hdl-checker*
HDL Checker is a wrapper for VHDL/Verilg/SystemVerilog tools that aims to
reduce the boilerplate code needed to set things up. It can automatically
infer libraries for VHDL sources, determine the compilation order and provide
some static checks.
You can install it using pip:
>
$ pip install hdl-checker
`hdl-checker` will be run from a detected project root, determined by the
following methods, in order:
1. Find the first directory containing a configuration file (see
|g:ale_hdl_checker_config_file|)
2. If no configuration file can be found, find the first directory containing
a folder named `'.git'
3. If no such folder is found, use the directory of the current buffer
g:ale_hdl_checker_executable
*g:ale_hdl_checker_executable*
*b:ale_hdl_checker_executable*
Type: |String|
Default: `'hdl_checker'`
This variable can be changed to the path to the 'hdl_checker' executable.
g:ale_hdl_checker_options *g:ale_hdl_checker_options*
*b:ale_hdl_checker_options*
Type: |String|
Default: `''`
This variable can be changed to modify the flags/options passed to the
'hdl_checker' server startup command.
g:ale_hdl_checker_config_file *g:ale_hdl_checker_config_file*
*b:ale_hdl_checker_config_file*
Type: |String|
Default: `'.hdl_checker.config'` (Unix),
`'_hdl_checker.config'` (Windows)
This variable can be changed to modify the config file HDL Checker will try
to look for. It will also affect how the project's root directory is
determined (see |ale-vhdl-hdl-checker|).
More info on the configuration file format can be found at:
https://github.com/suoto/hdl_checker/wiki/Setting-up-a-project
===============================================================================
vcom *ale-vhdl-vcom*

View File

@ -15,7 +15,6 @@ Install prettier either globally or locally: >
npm install prettier -g # global
npm install prettier # local
<
===============================================================================
swaglint *ale-yaml-swaglint*
@ -49,6 +48,43 @@ g:ale_yaml_swaglint_use_global *g:ale_yaml_swaglint_use_global*
See |ale-integrations-local-executables|
===============================================================================
yamlfix *ale-yaml-yamlfix*
Website: https://lyz-code.github.io/yamlfix
Installation
-------------------------------------------------------------------------------
Install yamlfix: >
pip install yamlfix
<
Options
-------------------------------------------------------------------------------
g:ale_yaml_yamlfix_executable *g:ale_yaml_yamlfix_executable*
*b:ale_yaml_yamlfix_executable*
Type: |String|
Default: `'yamlfix'`
See |ale-integrations-local-executables|
g:ale_yaml_yamlfix_options *g:ale_yaml_yamlfix_options*
*b:ale_yaml_yamlfix_options*
Type: |String|
Default: `''`
This variable can be set to pass extra options to yamlfix.
g:ale_yaml_yamlfix_use_global *g:ale_yaml_yamlfix_use_global*
*b:ale_yaml_yamlfix_use_global*
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
===============================================================================
yamllint *ale-yaml-yamllint*

View File

@ -0,0 +1,33 @@
===============================================================================
ALE Zig Integration *ale-zig-options*
*ale-integration-zig*
===============================================================================
Integration Information
Currently, the only supported linter for zig is zls.
===============================================================================
zls *ale-zig-zls*
g:ale_zig_zls_executable *g:ale_zig_zls_executable*
*b:ale_zig_zls_executable*
Type: |String|
Default: `'zls'`
This variable can be modified to change the executable path for `zls`.
g:ale_zig_zls_config *g:ale_zig_zls_config*
*b:ale_zig_zls_config*
Type: |Dictionary|
Default: `{}`
WARNING: As of writing, zls does not support receiving configuration
from the client. This variable is a PLACEHOLDER until it does.
Dictionary with configuration settings for zls.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@ -9,8 +9,9 @@ CONTENTS *ale-contents*
1. Introduction.........................|ale-introduction|
2. Supported Languages & Tools..........|ale-support|
3. Linting..............................|ale-lint|
3.1 Adding Language Servers...........|ale-lint-language-servers|
3.2 Other Sources.....................|ale-lint-other-sources|
3.1 Linting On Other Machines.........|ale-lint-other-machines|
3.2 Adding Language Servers...........|ale-lint-language-servers|
3.3 Other Sources.....................|ale-lint-other-sources|
4. Fixing Problems......................|ale-fix|
5. Language Server Protocol Support.....|ale-lsp|
5.1 Completion........................|ale-completion|
@ -19,6 +20,7 @@ CONTENTS *ale-contents*
5.4 Find References...................|ale-find-references|
5.5 Hovering..........................|ale-hover|
5.6 Symbol Search.....................|ale-symbol-search|
5.7 Refactoring: Rename, Actions......|ale-refactor|
6. Global Options.......................|ale-options|
6.1 Highlights........................|ale-highlights|
7. Linter/Fixer Options.................|ale-integration-options|
@ -127,7 +129,7 @@ their relevant options.
* By showing balloons for your mouse cursor - |g:ale_set_balloons|
Please consult the documentation for each option, which can reveal some other
ways of tweaking the behaviour of each way of displaying problems. You can
ways of tweaking the behavior of each way of displaying problems. You can
disable or enable whichever options you prefer.
Most settings can be configured for each buffer. (|b:| instead of |g:|),
@ -146,9 +148,68 @@ ALE offers several options for controlling which linters are run.
* Disabling only a subset of linters. - |g:ale_linters_ignore|
* Disabling LSP linters and `tsserver`. - |g:ale_disable_lsp|
You can stop ALE any currently running linters with the |ALELintStop| command.
Any existing problems will be kept.
-------------------------------------------------------------------------------
3.1 Adding Language Servers *ale-lint-language-servers*
3.1 Linting On Other Machines *ale-lint-other-machines*
ALE offers support for running linters or fixers on files you are editing
locally on other machines, so long as the other machine has access to the file
you are editing. This could be a linter or fixer run inside of a Docker image,
running in a virtual machine, running on a remote server, etc.
In order to run tools on other machines, you will need to configure your tools
to run via scripts that execute commands on those machines, such as by setting
the ALE `_executable` options for those tools to a path for a script to run,
or by using |g:ale_command_wrapper| to specify a script to wrap all commands
that are run by ALE, before they are executed. For tools that ALE runs where
ALE looks for locally installed executables first, you may need to set the
`_use_global` options for those tools to `1`, or you can set
|g:ale_use_global_executables| to `1` before ALE is loaded to only use global
executables for all tools.
In order for ALE to properly lint or fix files which are running on another
file system, you must provide ALE with |List|s of strings for mapping paths to
and from your local file system and the remote file system, such as the file
system of your Docker container. See |g:ale_filename_mappings| for all of the
different ways these filename mappings can be configured.
For example, you might configure `pylint` to run via Docker by creating a
script like so. >
#!/usr/bin/env bash
exec docker run -i --rm -v "$(pwd):/data" cytopia/pylint "$@"
<
You will run to run Docker commands with `-i` in order to read from stdin.
With the above script in mind, you might configure ALE to lint your Python
project with `pylint` by providing the path to the script to execute, and
mappings which describe how to between the two file systems in your
`python.vim` |ftplugin| file, like so: >
if expand('%:p') =~# '^/home/w0rp/git/test-pylint/'
let b:ale_linters = ['pylint']
let b:ale_python_pylint_use_global = 1
" This is the path to the script above.
let b:ale_python_pylint_executable = '/home/w0rp/git/test-pylint/pylint.sh'
" /data matches the path in Docker.
let b:ale_filename_mappings = {
\ 'pylint': [
\ ['/home/w0rp/git/test-pylint', '/data'],
\ ],
\}
endif
<
You might consider using a Vim plugin for loading Vim configuration files
specific to each project, if you have a lot of projects to manage.
-------------------------------------------------------------------------------
3.2 Adding Language Servers *ale-lint-language-servers*
ALE comes with many default configurations for language servers, so they can
be detected and run automatically. ALE can connect to other language servers
@ -189,7 +250,7 @@ address to connect to instead. >
-------------------------------------------------------------------------------
3.2 Other Sources *ale-lint-other-sources*
3.3 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
@ -246,7 +307,7 @@ A plugin might integrate its own checks with ALE like so: >
function! WorkDone(buffer, results) abort
" Send results to ALE after they have been collected.
call ale#other_source#ShowResults(buffer, 'some-name', a:results)
call ale#other_source#ShowResults(a:buffer, 'some-name', a:results)
endfunction
<
@ -287,6 +348,8 @@ are supported for running the commands.
file will be created, containing the lines from the file
after previous adjustment have been done.
See |ale-command-format-strings| for formatting options.
`read_temporary_file` When set to `1`, ALE will read the contents of the
temporary file created for `%t`. This option can be used
for commands which need to modify some file on disk in
@ -356,6 +419,10 @@ by default.
Fixers can be disabled on save with |g:ale_fix_on_save_ignore|. They will
still be run when you manually run |ALEFix|.
Fixers can be run on another machines, just like linters, such as fixers run
from a Docker container, running in a virtual machine, running a remote
server, etc. See |ale-lint-other-machines|.
===============================================================================
5. Language Server Protocol Support *ale-lsp*
@ -402,12 +469,56 @@ is loaded. The delay for completion can be configured with
|g:ale_completion_delay|. This setting should not be enabled if you wish to
use ALE as a completion source for other plugins.
ALE automatic completion will not work when 'paste' is active. Only set
'paste' when you are copy and pasting text into your buffers.
ALE automatic completion will interfere with default insert completion with
`CTRL-N` and so on (|compl-vim|). You can write your own keybinds and a
function in your |vimrc| file to force insert completion instead, like so: >
function! SmartInsertCompletion() abort
" Use the default CTRL-N in completion menus
if pumvisible()
return "\<C-n>"
endif
" Exit and re-enter insert mode, and use insert completion
return "\<C-c>a\<C-n>"
endfunction
inoremap <silent> <C-n> <C-R>=SmartInsertCompletion()<CR>
<
ALE provides an 'omnifunc' function |ale#completion#OmniFunc| for triggering
completion manually with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O| >
" Use ALE's function for omnicompletion.
set omnifunc=ale#completion#OmniFunc
<
*ale-completion-fallback*
You can write your own completion function and fallback on other methods of
completion by checking if there are no results that ALE can determine. For
example, for Python code, you could fall back on the `python3complete`
function. >
function! TestCompletionFunc(findstart, base) abort
let l:result = ale#completion#OmniFunc(a:findstart, a:base)
" Check if ALE couldn't find anything.
if (a:findstart && l:result is -3)
\|| (!a:findstart && empty(l:result))
" Defer to another omnifunc if ALE couldn't find anything.
return python3complete#Complete(a:findstart, a:base)
endif
return l:result
endfunction
set omnifunc=TestCompletionFunc
<
See |complete-functions| for documentation on how to write completion
functions.
ALE will only suggest so many possible matches for completion. The maximum
number of items can be controlled with |g:ale_completion_max_suggestions|.
@ -418,9 +529,21 @@ The |ALEComplete| command can be used to show completion suggestions manually,
even when |g:ale_completion_enabled| is set to `0`. For manually requesting
completion information with Deoplete, consult Deoplete's documentation.
When working with TypeScript files, ALE by can support automatic imports
from external modules. This behavior can be enabled by setting the
|g:ale_completion_tsserver_autoimport| variable to `1`.
ALE by can support automatic imports from external modules. This behavior can
be enabled by setting the |g:ale_completion_autoimport| variable to `1`.
You can manually request imports for symbols at the cursor with the
|ALEImport| command. The word at the cursor must be an exact match for some
potential completion result which includes additional text to insert into the
current buffer, which ALE will assume is code for an import line. This command
can be useful when your code already contains something you need to import.
You can execute other commands whenever ALE inserts some completion text with
the |ALECompletePost| event.
When working with TypeScript files, ALE can remove warnings from your
completions by setting the |g:ale_completion_tsserver_remove_warnings|
variable to 1.
*ale-completion-completeopt-bug*
@ -498,15 +621,9 @@ displayed.
-------------------------------------------------------------------------------
5.4 Find References *ale-find-references*
ALE supports finding references for symbols though any enabled LSP linters.
ALE will display a preview window showing the places where a symbol is
referenced in a codebase when a command is run. The following commands are
supported:
|ALEFindReferences| - Find references for the word under the cursor.
Options:
`-relative` Show file paths in the results relative to the working dir
ALE supports finding references for symbols though any enabled LSP linters
with the |ALEFindReferences| command. See the documentation for the command
for a full list of options.
-------------------------------------------------------------------------------
5.5 Hovering *ale-hover*
@ -516,6 +633,10 @@ at the cursor taken from LSP linters. The following commands are supported:
|ALEHover| - Print information about the symbol at the cursor.
Truncated information will be displayed when the cursor rests on a symbol by
default, as long as there are no problems on the same line. You can disable
this behavior by setting |g:ale_hover_cursor| to `0`.
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
@ -545,14 +666,38 @@ Documentation for symbols at the cursor can be retrieved using the
-------------------------------------------------------------------------------
5.6 Symbol Search *ale-symbol-search*
ALE supports searching for workspace symbols via LSP linters. The following
commands are supported:
ALE supports searching for workspace symbols via LSP linters with the
|ALESymbolSearch| command. See the documentation for the command
for a full list of options.
|ALESymbolSearch| - Search for symbols in the workspace.
-------------------------------------------------------------------------------
5.7 Refactoring: Rename, Actions *ale-refactor*
Options:
`-relative` Show file paths in the results relative to the working dir
ALE supports renaming symbols in code such as variables or class names with
the |ALERename| command.
|ALECodeAction| will execute actions on the cursor or applied to a visual
range selection, such as automatically fixing errors.
Actions will appear in the right click mouse menu by default for GUI versions
of Vim, unless disabled by setting |g:ale_popup_menu_enabled| to `0`.
Make sure to set your Vim to move the cursor position whenever you right
click, and enable the mouse menu: >
set mouse=a
set mousemodel=popup_setpos
<
You may wish to remove some other menu items you don't want to see: >
silent! aunmenu PopUp.Select\ Word
silent! aunmenu PopUp.Select\ Sentence
silent! aunmenu PopUp.Select\ Paragraph
silent! aunmenu PopUp.Select\ Line
silent! aunmenu PopUp.Select\ Block
silent! aunmenu PopUp.Select\ Blockwise
silent! aunmenu PopUp.Select\ All
<
===============================================================================
6. Global Options *ale-options*
@ -671,6 +816,9 @@ g:ale_completion_enabled *g:ale_completion_enabled*
This setting should not be enabled if you wish to use ALE as a completion
source for other completion plugins.
ALE automatic completion will not work when 'paste' is active. Only set
'paste' when you are copy and pasting text into your buffers.
A buffer-local version of this setting `b:ale_completion_enabled` can be set
to `0` to disable ALE's automatic completion support for a single buffer.
ALE's completion support must be enabled globally to be enabled locally.
@ -678,7 +826,18 @@ g:ale_completion_enabled *g:ale_completion_enabled*
See |ale-completion|
g:ale_completion_tsserver_autoimport *g:ale_completion_tsserver_autoimport*
*g:ale_completion_tsserver_remove_warnings*
g:ale_completion_tsserver_remove_warnings
Type: Number
Default: `0`
When this option is set to `0`, ALE will return all completion items,
including those that are a warning. Warnings can be excluded from completed
items by setting it to `1`.
g:ale_completion_autoimport *g:ale_completion_autoimport*
Type: Number
Default: `0`
@ -792,7 +951,7 @@ g:ale_default_navigation *g:ale_default_navigation*
Default: `'buffer'`
The default method for navigating away from the current buffer to another
buffer, such as for |ALEFindReferences:|, or |ALEGoToDefinition|.
buffer, such as for |ALEFindReferences|, or |ALEGoToDefinition|.
g:ale_disable_lsp *g:ale_disable_lsp*
@ -1048,9 +1207,27 @@ g:ale_history_log_output *g:ale_history_log_output*
if you want to save on some memory usage.
g:ale_hover_cursor *g:ale_hover_cursor*
Type: |Number|
Default: `1`
If set to `1`, ALE will show truncated information in the echo line about
the symbol at the cursor automatically when the |CursorHold| event is fired.
The delay before requesting hover information is based on 'updatetime', as
with all |CursorHold| events.
If there's a problem on the line where the cursor is resting, ALE will not
show any hover information.
See |ale-hover| for more information on hover information.
This setting must be set to `1` before ALE is loaded for this behavior
to be enabled. See |ale-lint-settings-on-startup|.
g:ale_hover_to_preview *g:ale_hover_to_preview*
*b:ale_hover_to_preview*
Type: |Number|
Default: `0`
@ -1085,7 +1262,7 @@ g:ale_list_window_size *g:ale_list_window_size*
g:ale_lint_delay *g:ale_lint_delay*
*b:ale_lint_delay*
Type: |Number|
Default: `200`
@ -1093,6 +1270,9 @@ g:ale_lint_delay *g:ale_lint_delay*
be run after text is changed. This option is only meaningful with the
|g:ale_lint_on_text_changed| variable set to `always`, `insert`, or `normal`.
A buffer-local option, `b:ale_lint_delay`, can be set to change the delay
for different buffers, such as in |ftplugin| files.
g:ale_lint_on_enter *g:ale_lint_on_enter*
@ -1205,6 +1385,7 @@ g:ale_linter_aliases *g:ale_linter_aliases*
\ 'csh': 'sh',
\ 'javascriptreact': ['javascript', 'jsx'],
\ 'plaintex': 'tex',
\ 'ps1': 'powershell',
\ 'rmarkdown': 'r',
\ 'rmd': 'r',
\ 'systemverilog': 'verilog',
@ -1249,6 +1430,90 @@ g:ale_linter_aliases *g:ale_linter_aliases*
<
No linters will be loaded when the buffer's filetype is empty.
g:ale_filename_mappings *g:ale_filename_mappings*
*b:ale_filename_mappings*
Type: |Dictionary| or |List|
Default: `{}`
Either a |Dictionary| mapping a linter or fixer name, as displayed in
|:ALEInfo|, to a |List| of two-item |List|s for filename mappings, or just a
|List| of two-item |List|s. When given some paths to files, the value of
this setting will be used to convert filenames on a local file system to
filenames on some remote file system, such as paths in a Docker image,
virtual machine, or network drive.
For example: >
let g:ale_filename_mappings = {
\ 'pylint': [
\ ['/home/john/proj', '/data'],
\ ],
\}
<
With the above configuration, a filename such as `/home/john/proj/foo.py`
will be provided to the linter/fixer as `/data/foo.py`, and paths parsed
from linter results such as `/data/foo.py` will be converted back to
`/home/john/proj/foo.py`.
You can use `*` as to apply a |List| of filename mappings to all other
linters or fixers not otherwise matched. >
" Use one List of paths for pylint.
" Use another List of paths for everything else.
let g:ale_filename_mappings = {
\ 'pylint': [
\ ['/home/john/proj', '/data'],
\ ],
\ '*': [
\ ['/home/john/proj', '/other-data'],
\ ],
\}
<
If you just want every single linter or fixer to use the same filename
mapping, you can just use a |List|. >
" Same as above, but for ALL linters and fixers.
let g:ale_filename_mappings = [
\ ['/home/john/proj', '/data'],
\]
<
You can provide many such filename paths for multiple projects. Paths are
matched by checking if the start of a file path matches the given strings,
in a case-sensitive manner. Earlier entries in the |List| will be tried
before later entries when mapping to a given file system.
Buffer-local options can be set to the same values to override the global
options, such as in |ftplugin| files.
NOTE: Only fixers registered with a short name can support filename mapping
by their fixer names. See |ale-fix|. Filename mappings set for all tools by
using only a |List| for the setting will also be applied to fixers not in
the registry.
NOTE: In order for this filename mapping to work correctly, linters and
fixers must exclusively determine paths to files to lint or fix via ALE
command formatting as per |ale-command-format-strings|, and paths parsed
from linter files must be provided in `filename` keys if a linter returns
results for more than one file at a time, as per |ale-loclist-format|. If
you discover a linter or fixer which does not behave properly, please report
it as an issue.
If you are running a linter or fixer through Docker or another remote file
system, you may have to mount your temporary directory, which you can
discover with the following command: >
:echo fnamemodify(tempname(), ':h:h')
<
You should provide a mapping from this temporary directory to whatever you
mount this directory to in Docker, or whatever remote file system you are
working with.
You can inspect the filename mappings ALE will use with the
|ale#GetFilenameMappings()| function.
g:ale_linters *g:ale_linters*
*b:ale_linters*
Type: |Dictionary|
@ -1268,8 +1533,8 @@ g:ale_linters *g:ale_linters*
\ 'help': [],
\ 'perl': ['perlcritic'],
\ 'perl6': [],
\ 'python': ['flake8', 'mypy', 'pylint'],
\ 'rust': ['cargo'],
\ 'python': ['flake8', 'mypy', 'pylint', 'pyright'],
\ 'rust': ['cargo', 'rls'],
\ 'spec': [],
\ 'text': [],
\ 'vue': ['eslint', 'vls'],
@ -1429,6 +1694,7 @@ g:ale_lsp_root *g:ale_lsp_root*
If neither variable yields a result, a linter-specific function is invoked to
detect a project root. If this, too, yields no result, the linter is disabled.
g:ale_max_buffer_history_size *g:ale_max_buffer_history_size*
Type: |Number|
@ -1537,6 +1803,19 @@ g:ale_pattern_options_enabled *g:ale_pattern_options_enabled*
will not set buffer variables per |g:ale_pattern_options|.
g:ale_popup_menu_enabled *g:ale_popup_menu_enabled*
Type: |Number|
Default: `has('gui_running')`
When this option is set to `1`, ALE will show code actions and rename
capabilities in the right click mouse menu when there's a LSP server or
tsserver available. See |ale-refactor|.
This setting must be set to `1` before ALE is loaded for this behavior
to be enabled. See |ale-lint-settings-on-startup|.
g:ale_rename_tsserver_find_in_comments *g:ale_rename_tsserver_find_in_comments*
Type: |Number|
@ -1561,7 +1840,7 @@ g:ale_rename_tsserver_find_in_strings *g:ale_rename_tsserver_find_in_strings*
g:ale_set_balloons *g:ale_set_balloons*
*b:ale_set_balloons*
Type: |Number|
Type: |Number| or |String|
Default: `has('balloon_eval') && has('gui_running')`
When this option is set to `1`, balloon messages will be displayed for
@ -1572,6 +1851,13 @@ g:ale_set_balloons *g:ale_set_balloons*
supporting "Hover" information, per |ale-hover|, then brief information
about the symbol under the cursor will be displayed in a balloon.
This option can be set to `'hover'` to only enable balloons for hover
message, so diagnostics are never shown in balloons. You may wish to
configure use this setting only in GUI Vim like so: >
let g:ale_set_balloons = has('gui_running') ? 'hover' : 0
<
Balloons can be enabled for terminal versions of Vim that support balloons,
but some versions of Vim will produce strange mouse behavior when balloons
are enabled. To configure balloons for your terminal, you should first
@ -2284,16 +2570,16 @@ documented in additional help files.
bib.....................................|ale-bib-options|
bibclean..............................|ale-bib-bibclean|
c.......................................|ale-c-options|
clang.................................|ale-c-clang|
astyle................................|ale-c-astyle|
cc....................................|ale-c-cc|
ccls..................................|ale-c-ccls|
clangd................................|ale-c-clangd|
clang-format..........................|ale-c-clangformat|
clangtidy.............................|ale-c-clangtidy|
cppcheck..............................|ale-c-cppcheck|
cquery................................|ale-c-cquery|
flawfinder............................|ale-c-flawfinder|
gcc...................................|ale-c-gcc|
uncrustify............................|ale-c-uncrustify|
ccls..................................|ale-c-ccls|
chef....................................|ale-chef-options|
cookstyle.............................|ale-chef-cookstyle|
foodcritic............................|ale-chef-foodcritic|
@ -2306,9 +2592,11 @@ documented in additional help files.
cmakelint.............................|ale-cmake-cmakelint|
cmake-format..........................|ale-cmake-cmakeformat|
cpp.....................................|ale-cpp-options|
clang.................................|ale-cpp-clang|
clangd................................|ale-cpp-clangd|
astyle................................|ale-cpp-astyle|
cc....................................|ale-cpp-cc|
ccls..................................|ale-cpp-ccls|
clangcheck............................|ale-cpp-clangcheck|
clangd................................|ale-cpp-clangd|
clang-format..........................|ale-cpp-clangformat|
clangtidy.............................|ale-cpp-clangtidy|
clazy.................................|ale-cpp-clazy|
@ -2316,9 +2604,7 @@ documented in additional help files.
cpplint...............................|ale-cpp-cpplint|
cquery................................|ale-cpp-cquery|
flawfinder............................|ale-cpp-flawfinder|
gcc...................................|ale-cpp-gcc|
uncrustify............................|ale-cpp-uncrustify|
ccls..................................|ale-cpp-ccls|
c#......................................|ale-cs-options|
csc...................................|ale-cs-csc|
mcs...................................|ale-cs-mcs|
@ -2353,6 +2639,7 @@ documented in additional help files.
elm-make..............................|ale-elm-elm-make|
erlang..................................|ale-erlang-options|
dialyzer..............................|ale-erlang-dialyzer|
elvis.................................|ale-erlang-elvis|
erlc..................................|ale-erlang-erlc|
syntaxerl.............................|ale-erlang-syntaxerl|
eruby...................................|ale-eruby-options|
@ -2406,6 +2693,7 @@ documented in additional help files.
stack-ghc.............................|ale-haskell-stack-ghc|
stylish-haskell.......................|ale-haskell-stylish-haskell|
hie...................................|ale-haskell-hie|
ormolu................................|ale-haskell-ormolu|
hcl.....................................|ale-hcl-options|
terraform-fmt.........................|ale-hcl-terraform-fmt|
html....................................|ale-html-options|
@ -2465,7 +2753,9 @@ documented in additional help files.
lua.....................................|ale-lua-options|
luac..................................|ale-lua-luac|
luacheck..............................|ale-lua-luacheck|
luafmt................................|ale-lua-luafmt|
markdown................................|ale-markdown-options|
markdownlint..........................|ale-markdown-markdownlint|
mdl...................................|ale-markdown-mdl|
prettier..............................|ale-markdown-prettier|
remark-lint...........................|ale-markdown-remark-lint|
@ -2515,6 +2805,8 @@ documented in additional help files.
psalm.................................|ale-php-psalm|
php-cs-fixer..........................|ale-php-php-cs-fixer|
php...................................|ale-php-php|
tlint.................................|ale-php-tlint|
intelephense..........................|ale-php-intelephense|
po......................................|ale-po-options|
write-good............................|ale-po-write-good|
pod.....................................|ale-pod-options|
@ -2540,6 +2832,7 @@ documented in additional help files.
pyrex (cython)..........................|ale-pyrex-options|
cython................................|ale-pyrex-cython|
python..................................|ale-python-options|
autoimport............................|ale-python-autoimport|
autopep8..............................|ale-python-autopep8|
bandit................................|ale-python-bandit|
black.................................|ale-python-black|
@ -2554,12 +2847,14 @@ documented in additional help files.
pylint................................|ale-python-pylint|
pyls..................................|ale-python-pyls|
pyre..................................|ale-python-pyre|
pyright...............................|ale-python-pyright|
reorder-python-imports................|ale-python-reorder_python_imports|
vulture...............................|ale-python-vulture|
yapf..................................|ale-python-yapf|
qml.....................................|ale-qml-options|
qmlfmt................................|ale-qml-qmlfmt|
r.......................................|ale-r-options|
languageserver........................|ale-r-languageserver|
lintr.................................|ale-r-lintr|
styler................................|ale-r-styler|
reasonml................................|ale-reasonml-options|
@ -2600,6 +2895,7 @@ documented in additional help files.
sasslint..............................|ale-scss-sasslint|
stylelint.............................|ale-scss-stylelint|
sh......................................|ale-sh-options|
bashate...............................|ale-sh-bashate|
sh-language-server....................|ale-sh-language-server|
shell.................................|ale-sh-shell|
shellcheck............................|ale-sh-shellcheck|
@ -2650,12 +2946,14 @@ documented in additional help files.
vala....................................|ale-vala-options|
uncrustify............................|ale-vala-uncrustify|
verilog/systemverilog...................|ale-verilog-options|
hdl-checker...........................|ale-verilog-hdl-checker|
iverilog..............................|ale-verilog-iverilog|
verilator.............................|ale-verilog-verilator|
vlog..................................|ale-verilog-vlog|
xvlog.................................|ale-verilog-xvlog|
vhdl....................................|ale-vhdl-options|
ghdl..................................|ale-vhdl-ghdl|
hdl-checker...........................|ale-vhdl-hdl-checker|
vcom..................................|ale-vhdl-vcom|
xvhdl.................................|ale-vhdl-xvhdl|
vim.....................................|ale-vim-options|
@ -2673,9 +2971,12 @@ documented in additional help files.
yaml....................................|ale-yaml-options|
prettier..............................|ale-yaml-prettier|
swaglint..............................|ale-yaml-swaglint|
yamlfix...............................|ale-yaml-yamlfix|
yamllint..............................|ale-yaml-yamllint|
yang....................................|ale-yang-options|
yang-lsp..............................|ale-yang-lsp|
zig.....................................|ale-zig-options|
zls...................................|ale-zig-zls|
===============================================================================
@ -2722,18 +3023,29 @@ ALEFindReferences *ALEFindReferences*
The default method used for navigating to a new location can be changed
by modifying |g:ale_default_navigation|.
You can add `-relative` to the command to view results with relatives paths,
instead of absolute paths.
The selection can be opened again with the |ALERepeatSelection| command.
You can jump back to the position you were at before going to a reference of
something with jump motions like CTRL-O. See |jump-motions|.
A plug mapping `<Plug>(ale_find_references)` is defined for this command.
You can define additional plug mapping with any additional options you want
like so: >
nnoremap <silent> <Plug>(my_mapping) :ALEFindReferences -relative<Return>
<
ALEFix *ALEFix*
Fix problems with the current buffer. See |ale-fix| for more information.
If the command is run with a bang (`:ALEFix!`), all warnings will be
suppressed, including warnings about no fixers being defined, and warnings
about not being able to apply fixes to a file because it has been changed.
A plug mapping `<Plug>(ale_fix)` is defined for this command.
@ -2766,7 +3078,13 @@ ALEGoToDefinition `<options>` *ALEGoToDefinition*
command. Otherwise, Vim will refuse to leave the buffer you're jumping from
unless you have saved your edits.
A plug mapping `<Plug>(ale_go_to_definition)` is defined for this command.
The following Plug mappings are defined for this command, which correspond
to the following commands.
`<Plug>(ale_go_to_definition)` - `:ALEGoToDefinition`
`<Plug>(ale_go_to_definition_in_tab)` - `:ALEGoToDefinition -tab`
`<Plug>(ale_go_to_definition_in_split)` - `:ALEGoToDefinition -split`
`<Plug>(ale_go_to_definition_in_vsplit)` - `:ALEGoToDefinition -vsplit`
ALEGoToTypeDefinition *ALEGoToTypeDefinition*
@ -2788,8 +3106,13 @@ ALEGoToTypeDefinition *ALEGoToTypeDefinition*
You can jump back to the position you were at before going to the definition
of something with jump motions like CTRL-O. See |jump-motions|.
A plug mapping `<Plug>(ale_go_to_type_definition)` is defined for this
command.
The following Plug mappings are defined for this command, which correspond
to the following commands.
`<Plug>(ale_go_to_type_definition)` - `:ALEGoToTypeDefinition`
`<Plug>(ale_go_to_type_definition_in_tab)` - `:ALEGoToTypeDefinition -tab`
`<Plug>(ale_go_to_type_definition_in_split)` - `:ALEGoToTypeDefinition -split`
`<Plug>(ale_go_to_type_definition_in_vsplit)` - `:ALEGoToTypeDefinition -vsplit`
ALEHover *ALEHover*
@ -2805,6 +3128,23 @@ ALEHover *ALEHover*
A plug mapping `<Plug>(ale_hover)` is defined for this command.
ALEImport *ALEImport*
Try to import a symbol using `tsserver` or a Language Server.
ALE will look for completions for the word at the cursor which contain
additional text edits that possible insert lines to import the symbol. The
first match with additional text edits will be used, and may add other code
to the current buffer other than import lines.
If linting is enabled, and |g:ale_lint_on_text_changed| is set to ever check
buffers when text is changed, the buffer will be checked again after changes
are made.
A Plug mapping `<Plug>(ale_import)` is defined for this command. This
mapping should only be bound for normal mode.
ALEOrganizeImports *ALEOrganizeImports*
Organize imports using tsserver. Currently not implemented for LSPs.
@ -2812,9 +3152,22 @@ ALEOrganizeImports *ALEOrganizeImports*
ALERename *ALERename*
Rename a symbol using TypeScript server or Language Server.
Rename a symbol using `tsserver` or a Language Server.
The user will be prompted for a new name.
The symbol where the cursor is resting will be the symbol renamed, and a
prompt will open to request a new name.
ALECodeAction *ALECodeAction*
Apply a code action via LSP servers or `tsserver`.
If there is an error present on a line that can be fixed, ALE will
automatically fix a line, unless there are multiple possible code fixes to
apply.
This command can be run in visual mode apply actions, such as applicable
refactors. A menu will be shown to select code action to apply.
ALERepeatSelection *ALERepeatSelection*
@ -2829,18 +3182,28 @@ ALESymbolSearch `<query>` *ALESymbolSearch*
The arguments provided to this command will be used as a search query for
finding symbols in the workspace, such as functions, types, etc.
You can add `-relative` to the command to view results with relatives paths,
instead of absolute paths.
*:ALELint*
ALELint *ALELint*
Run ALE once for the current buffer. This command can be used to run ALE
manually, instead of automatically, if desired.
This command will also run linters where `lint_file` is set to `1`, or in
other words linters which check the file instead of the Vim buffer.
This command will also run linters where `lint_file` is evaluates to `1`,
meaning linters which check the file instead of the Vim buffer.
A plug mapping `<Plug>(ale_lint)` is defined for this command.
ALELintStop *ALELintStop*
Stop any currently running jobs for checking the current buffer.
Any problems from previous linter results will continue to be shown.
ALEPrevious *ALEPrevious*
ALEPreviousWrap *ALEPreviousWrap*
ALENext *ALENext*
@ -2858,7 +3221,7 @@ ALELast *ALELast*
the last or first warning or error in the file, respectively.
`ALEPrevious` and `ALENext` take optional flags arguments to custom their
behaviour :
behavior :
`-wrap` enable wrapping around the file
`-error`, `-warning` and `-info` enable jumping to errors, warnings or infos
respectively, ignoring anything else. They are mutually exclusive and if
@ -3018,6 +3381,15 @@ ale#Env(variable_name, value) *ale#Env()*
'set VAR="some value" && command' # On Windows
ale#GetFilenameMappings(buffer, name) *ale#GetFilenameMappings()*
Given a `buffer` and the `name` of either a linter for fixer, return a
|List| of two-item |List|s that describe mapping to and from the local and
foreign file systems for running a particular linter or fixer.
See |g:ale_filename_mappings| for details on filename mapping.
ale#Has(feature) *ale#Has()*
Return `1` if ALE supports a given feature, like |has()| for Vim features.
@ -3040,9 +3412,9 @@ ale#Queue(delay, [linting_flag, buffer_number]) *ale#Queue()*
The linters will always be run in the background. Calling this function
again from the same buffer
An optional `linting_flag` argument can be given. If `linting_flag`
is `'lint_file'`, then linters where the `lint_file` option is set to `1` will be
run. Linters with `lint_file` set to `1` are not run by default.
An optional `linting_flag` argument can be given. If `linting_flag` is
`'lint_file'`, then linters where the `lint_file` option evaluates to `1`
will be run. Otherwise, those linters will not be run.
An optional `buffer_number` argument can be given for specifying the buffer
to check. The active buffer (`bufnr('')`) will be checked by default.
@ -3132,23 +3504,36 @@ ale#command#Run(buffer, command, callback, [options]) *ale#command#Run()*
<
The following `options` can be provided.
`output_stream` - Either `'stdout'`, `'stderr'`, `'both'`, or `'none`' for
selecting which output streams to read lines from.
`output_stream` - Either `'stdout'`, `'stderr'`, `'both'`, or
`'none`' for selecting which output streams to read
lines from.
The default is `'stdout'`
The default is `'stdout'`
`executable` - An executable for formatting into `%e` in the command.
If this option is not provided, formatting commands with
`%e` will not work.
`executable` - An executable for formatting into `%e` in the
command. If this option is not provided, formatting
commands with `%e` will not work.
`read_buffer` - If set to `1`, the buffer will be piped into the
command.
`read_buffer` - If set to `1`, the buffer will be piped into the
command.
The default is `0`.
The default is `0`.
`input` - When creating temporary files with `%t` or piping
text into a command `input` can be set to a |List| of
text to use instead of the buffer's text.
`filename_mappings` - A |List| of two-item |List|s describing filename
mappings to apply for formatted filenames in the
command string, as per |g:ale_filename_mappings|.
If the call to this function is being used for a
linter or fixer, the mappings should be provided with
this option, and can be retrieved easily with
|ale#GetFilenameMappings()|.
The default is `[]`.
`input` - When creating temporary files with `%t` or piping text
into a command `input` can be set to a |List| of text to
use instead of the buffer's text.
ale#command#EscapeCommandPart(command_part) *ale#command#EscapeCommandPart()*
@ -3363,24 +3748,30 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
if a command manually reads from a temporary file
instead, etc.
This option behaves as if it was set to `0` when the
`lint_file` option evaluates to `1`.
*ale-lint-file*
`lint_file` A |Number| (`0` or `1`) indicating whether a command
should read the file instead of the Vim buffer. This
option can be used for linters which must check the
file on disk, and which cannot check a Vim buffer
instead.
`lint_file` A |Number| (`0` or `1`), or a |Funcref| for a function
accepting a buffer number for computing either `0` or
`1`, indicating whether a command should read the file
instead of the Vim buffer. This option can be used
for linters which must check the file on disk, and
which cannot check a Vim buffer instead.
Linters set with this option will not be run as a
user types, per |g:ale_lint_on_text_changed|. Linters
will instead be run only when events occur against
the file on disk, including |g:ale_lint_on_enter|
and |g:ale_lint_on_save|. Linters with this option
set to `1` will also be run when linters are run
manually, per |ALELintPost-autocmd|.
The result can be computed with |ale#command#Run()|.
When this option is set to `1`, `read_buffer` will
be set automatically to `0`. The two options cannot
be used together.
Linters where the eventual value of this option
evaluates to `1` will not be run as a user types, per
|g:ale_lint_on_text_changed|. Linters will instead be
run only when events occur against the file on disk,
including |g:ale_lint_on_enter| and
|g:ale_lint_on_save|. Linters where this option
evaluates to `1` will also be run when the |ALELint|
command is run.
When this option is evaluates to `1`, ALE will behave
as if `read_buffer` was set to `0`.
*ale-lsp-linters*
`lsp` A |String| for defining LSP (Language Server Protocol)
@ -3500,7 +3891,7 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
contents of the buffer being checked. All occurrences of `%t` in command
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
will be automatically deleted, following the behavior of
|ale#command#ManageDirectory|. This option can be used for some linters which
do not support reading from stdin.
@ -3519,13 +3910,22 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
command, so literal character sequences `%s` and `%t` can be escaped by
using `%%s` and `%%t` instead, etc.
Some |filename-modifiers| can be applied to `%s` and `%t`. Only `:h`, `:t`,
`:r`, and `:e` may be applied, other modifiers will be ignored. Filename
modifiers can be applied to the format markers by placing them after them.
For example: >
'command': '%s:h %s:e %s:h:t',
<
Given a path `/foo/baz/bar.txt`, the above command string will generate
something akin to `'/foo/baz' 'txt' 'baz'`
If a callback for a command generates part of a command string which might
possibly contain `%%`, `%s`, `%t`, or `%e`, where the special formatting
behavior is not desired, the |ale#command#EscapeCommandPart()| function can
be used to replace those characters to avoid formatting issues.
*ale-linter-loading-behavior*
*ale-linter-loading-behaviour*
Linters for ALE will be loaded by searching |runtimepath| in the following
format: >
@ -3669,6 +4069,23 @@ g:ale_want_results_buffer *g:ale_want_results_buffer*
figure out which buffer other sources should lint.
ALECompletePost *ALECompletePost-autocmd*
*ALECompletePost*
This |User| autocmd is triggered after ALE inserts an item on
|CompleteDone|. This event can be used to run commands after a buffer
is changed by ALE as the result of completion. For example, |ALEFix| can
be configured to run automatically when completion is done: >
augroup FixAfterComplete
autocmd!
" Run ALEFix when completion items are added.
autocmd User ALECompletePost ALEFix!
" If ALE starts fixing a file, stop linters running for now.
autocmd User ALEFixPre ALELintStop
augroup END
<
ALELintPre *ALELintPre-autocmd*
*ALELintPre*
ALELintPost *ALELintPost-autocmd*