diff options
Diffstat (limited to 'doc')
34 files changed, 2354 insertions, 782 deletions
diff --git a/doc/ale-asciidoc.txt b/doc/ale-asciidoc.txt index b6b64fd3..86629fd4 100644 --- a/doc/ale-asciidoc.txt +++ b/doc/ale-asciidoc.txt @@ -9,4 +9,10 @@ See |ale-write-good-options| =============================================================================== +textlint *ale-asciidoc-textlint* + +See |ale-text-textlint| + + +=============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-chef.txt b/doc/ale-chef.txt index 5024e279..75e144ec 100644 --- a/doc/ale-chef.txt +++ b/doc/ale-chef.txt @@ -3,6 +3,26 @@ ALE Chef Integration *ale-chef-options* =============================================================================== +cookstyle *ale-chef-cookstyle* + +g:ale_chef_cookstyle_options *g:ale_chef_cookstyle_options* + *b:ale_chef_cookstyle_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to cookstyle. + + +g:ale_chef_cookstyle_executable *g:ale_chef_cookstyle_executable* + *b:ale_chef_cookstyle_executable* + Type: |String| + Default: `'cookstyle'` + + This variable can be changed to point to the cookstyle binary in case it's + not on the $PATH or a specific version/path must be used. + + +=============================================================================== foodcritic *ale-chef-foodcritic* g:ale_chef_foodcritic_options *g:ale_chef_foodcritic_options* diff --git a/doc/ale-clojure.txt b/doc/ale-clojure.txt index a83e336f..2bf00c03 100644 --- a/doc/ale-clojure.txt +++ b/doc/ale-clojure.txt @@ -3,6 +3,13 @@ ALE Clojure Integration *ale-clojure-options* =============================================================================== +clj-kondo *ale-clojure-clj-kondo* + +A minimal and opinionated linter for code that sparks joy. + +https://github.com/borkdude/clj-kondo + +=============================================================================== joker *ale-clojure-joker* Joker is a small Clojure interpreter and linter written in Go. diff --git a/doc/ale-cmake.txt b/doc/ale-cmake.txt index fb46336f..602637b1 100644 --- a/doc/ale-cmake.txt +++ b/doc/ale-cmake.txt @@ -22,4 +22,22 @@ g:ale_cmake_cmakelint_options *g:ale_cmake_cmakelint_options* =============================================================================== +cmake-format *ale-cmake-cmakeformat* + +g:ale_cmake_cmakeformat_executable *g:ale_cmake_cmakeformat_executable* + *b:ale_cmake_cmakeformat_executable* + Type: |String| + Default: `'cmakeformat'` + + This variable can be set to change the path the cmake-format. + + +g:ale_cmake_cmakeformat_options *g:ale_cmake_cmakeformat_options* + *b:ale_cmake_cmakeformat_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to cmake-format. + +=============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-css.txt b/doc/ale-css.txt index f3cae385..ff74b263 100644 --- a/doc/ale-css.txt +++ b/doc/ale-css.txt @@ -3,6 +3,14 @@ ALE CSS Integration *ale-css-options* =============================================================================== +fecs *ale-css-fecs* + +`fecs` options for CSS is the same as the options for JavaScript, and both of +them reads `./.fecsrc` as the default configuration file. See: +|ale-javascript-fecs|. + + +=============================================================================== prettier *ale-css-prettier* See |ale-javascript-prettier| for information about the available options. diff --git a/doc/ale-cuda.txt b/doc/ale-cuda.txt index 052b3363..0e53f756 100644 --- a/doc/ale-cuda.txt +++ b/doc/ale-cuda.txt @@ -22,4 +22,11 @@ g:ale_cuda_nvcc_options *g:ale_cuda_nvcc_options* This variable can be changed to modify flags given to nvcc. =============================================================================== +clang-format *ale-cuda-clangformat* + +See |ale-c-clangformat| for information about the available options. +Note that the C options are also used for cuda. + + +=============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-development.txt b/doc/ale-development.txt index 1e168130..9c9f0394 100644 --- a/doc/ale-development.txt +++ b/doc/ale-development.txt @@ -1,4 +1,5 @@ *ale-development.txt* For Vim version 8.0. +*ale-dev* *ale-development* ALE Development Documentation @@ -11,6 +12,7 @@ CONTENTS *ale-development-contents* 3. Coding Standards.....................|ale-coding-standards| 4. Testing ALE..........................|ale-development-tests| 4.1. Writing Linter Tests.............|ale-development-linter-tests| + 4.2. Writing Fixer Tests..............|ale-development-fixer-tests| =============================================================================== 1. Introduction *ale-development-introduction* @@ -143,7 +145,7 @@ Apply the following rules when writing Bash scripts. * Try to write scripts so they will run on Linux, BSD, or Mac OSX. =============================================================================== -4. Testing ALE *ale-development-tests* +4. Testing ALE *ale-development-tests* *ale-dev-tests* *ale-tests* ALE is tested with a suite of tests executed in Travis CI and AppVeyor. ALE runs tests with the following versions of Vim in the following environments. @@ -287,10 +289,10 @@ and should be written like so. > AssertLinter 'some-command', ale#Escape('some-command') . ' --foo' Execute(Check chained commands): - " WithChainResults can be called with 1 or more list for passing output + " GivenCommandOutput can be called with 1 or more list for passing output " to chained commands. The output for each callback defaults to an empty " list. - WithChainResults ['v2.1.2'] + GivenCommandOutput ['v2.1.2'] " Given a List of commands, check all of them. " Given a String, only the last command in the chain will be checked. AssertLinter 'some-command', [ @@ -301,7 +303,7 @@ and should be written like so. > The full list of commands that will be temporarily defined for linter tests given the above setup are as follows. -`WithChainResults [...]` - Define output for command chain functions. +`GivenCommandOutput [...]` - Define output for ale#command#Run. `AssertLinter executable, command` - Check the executable and command. `AssertLinterNotExecuted` - Check that linters will not be executed. `AssertLSPLanguage language` - Check the language given to an LSP server. @@ -310,5 +312,46 @@ given the above setup are as follows. `AssertLSPProject project_root` - Check the root given to an LSP server. `AssertLSPAddress address` - Check the address to an LSP server. + +=============================================================================== +4.2 Writing Fixer Tests *ale-development-fixer-tests* + +Tests for ALE fixers should go in the `test/fixers` directory, and should +be written like so. > + + Before: + " Load the fixer and set up a series of commands, reset fixer variables, + " clear caches, etc. + " + " Vader's 'Save' command will be called here for fixer variables. + call ale#assert#SetUpFixerTest('filetype', 'fixer_name') + + After: + " Reset fixers, variables, etc. + " + " Vader's 'Restore' command will be called here. + call ale#assert#TearDownFixerTest() + + Execute(The default command should be correct): + " AssertFixer checks the result of the loaded fixer function. + AssertFixer {'command': ale#Escape('some-command') . ' --foo'} + + Execute(Check chained commands): + " Same as above for linter tests. + GivenCommandOutput ['v2.1.2'] + " Given a List of commands, check all of them. + " Given anything else, only the last result will be checked. + AssertFixer [ + \ ale#Escape('some-command') . ' --version', + \ {'command': ale#Escape('some-command') . ' --foo'} + \] +< +The full list of commands that will be temporarily defined for fixer tests +given the above setup are as follows. + +`GivenCommandOutput [...]` - Define output for ale#command#Run. +`AssertFixer results` - Check the fixer results + + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-elixir.txt b/doc/ale-elixir.txt index 45c6de1d..5864f728 100644 --- a/doc/ale-elixir.txt +++ b/doc/ale-elixir.txt @@ -72,6 +72,18 @@ g:ale_elixir_elixir_ls_config *g:ale_elixir_elixir_ls_config* \ } < Consult the ElixirLS documentation for more information about settings. +=============================================================================== +credo *ale-elixir-credo* + +Credo (https://github.com/rrrene/credo) + +g:ale_elixir_credo_strict *g:ale_elixir_credo_strict* + + Type: Integer + Default: 0 + + Tells credo to run in strict mode or suggest mode. Set variable to 1 to + enable --strict mode. =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-elm.txt b/doc/ale-elm.txt index de7d8939..bb7a6132 100644 --- a/doc/ale-elm.txt +++ b/doc/ale-elm.txt @@ -29,6 +29,24 @@ g:ale_elm_format_options *g:ale_elm_format_options* This variable can be set to pass additional options to elm-format. =============================================================================== +elm-lsp *ale-elm-elm-lsp* + +g:ale_elm_lsp_executable *g:ale_elm_lsp_executable* + *b:ale_elm_lsp_executable* + Type: |String| + Default: `'elm-lsp'` + + See |ale-integrations-local-executables| + + +g:ale_elm_lsp_use_global *g:ale_elm_lsp_use_global* + *b:ale_elm_lsp_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + +=============================================================================== elm-make *ale-elm-elm-make* g:ale_elm_make_executable *g:ale_elm_make_executable* diff --git a/doc/ale-go.txt b/doc/ale-go.txt index 43289bd5..611e3fdd 100644 --- a/doc/ale-go.txt +++ b/doc/ale-go.txt @@ -7,7 +7,7 @@ Integration Information The `gometalinter` linter is disabled by default. ALE enables `gofmt`, `golint` and `go vet` by default. It also supports `staticcheck`, `go -build`, `gosimple`, and `golangserver`. +build`, `gosimple`, `golangserver`. To enable `gometalinter`, update |g:ale_linters| as appropriate: > @@ -31,6 +31,23 @@ g:ale_go_go_executable *g:ale_go_go_options* =============================================================================== +bingo *ale-go-bingo* + +g:ale_go_bingo_executable *g:ale_go_bingo_executable* + *b:ale_go_bingo_executable* + Type: |String| + Default: `'bingo'` + + Location of the bingo binary file. + + +g:ale_go_bingo_options *g:ale_go_bingo_options* + *b:ale_go_bingo_options* + Type: |String| + Default: `''` + + +=============================================================================== gobuild *ale-go-gobuild* g:ale_go_gobuild_options *g:ale_go_gobuild_options* @@ -54,6 +71,60 @@ g:ale_go_gofmt_options *g:ale_go_gofmt_options* =============================================================================== +golangci-lint *ale-go-golangci-lint* + +`golangci-lint` is a `lint_file` linter, which only lints files that are +written to disk. This differs from the default behavior of linting the buffer. +See: |ale-lint-file| + +g:ale_go_golangci_lint_executable *g:ale_go_golangci_lint_executable* + *b:ale_go_golangci_lint_executable* + Type: |String| + Default: `'golangci-lint'` + + The executable that will be run for golangci-lint. + + +g:ale_go_golangci_lint_options *g:ale_go_golangci_lint_options* + *b:ale_go_golangci_lint_options* + Type: |String| + Default: `'--enable-all'` + + This variable can be changed to alter the command-line arguments to the + golangci-lint invocation. + + +g:ale_go_golangci_lint_package *g:ale_go_golangci_lint_package* + *b:ale_go_golangci_lint_package* + Type: |Number| + Default: `0` + + When set to `1`, the whole Go package will be checked instead of only the + current file. + + +=============================================================================== +golangserver *ale-go-golangserver* + +g:ale_go_langserver_executable *g:ale_go_langserver_executable* + *b:ale_go_langserver_executable* + Type: |String| + Default: `'go-langserver'` + + Location of the go-langserver binary file. + + +g:ale_go_langserver_options *g:ale_go_langserver_options* + *b:ale_go_langserver_options* + Type: |String| + Default: `''` + + Additional options passed to the go-langserver command. Note that the + `-gocodecompletion` option is ignored because it is handled automatically + by the |g:ale_completion_enabled| variable. + + +=============================================================================== golint *ale-go-golint* g:ale_go_golint_executable *g:ale_go_golint_executable* @@ -73,17 +144,6 @@ g:ale_go_golint_options *g:ale_go_golint_options* =============================================================================== -govet *ale-go-govet* - -g:ale_go_govet_options *g:ale_go_govet_options* - *b:ale_go_govet_options* - Type: |String| - Default: `''` - - This variable can be set to pass additional options to the go vet linter. - - -=============================================================================== gometalinter *ale-go-gometalinter* `gometalinter` is a `lint_file` linter, which only lints files that are @@ -122,72 +182,47 @@ g:ale_go_gometalinter_lint_package *g:ale_go_gometalinter_lint_package* =============================================================================== -staticcheck *ale-go-staticcheck* +gopls *ale-go-gopls* -g:ale_go_staticcheck_options *g:ale_go_staticcheck_options* - *b:ale_go_staticcheck_options* +g:ale_go_gopls_executable *g:ale_go_gopls_executable* + *b:ale_go_gopls_executable* Type: |String| - Default: `''` - - This variable can be set to pass additional options to the staticcheck - linter. + Default: `'gopls'` + Location of the gopls binary file. -g:ale_go_staticcheck_lint_package *g:ale_go_staticcheck_lint_package* - *b:ale_go_staticcheck_lint_package* - Type: |Number| - Default: `0` - When set to `1`, the whole Go package will be checked instead of only the - current file. +g:ale_go_gopls_options *g:ale_go_gopls_options* + *b:ale_go_gopls_options* + Type: |String| + Default: `''` =============================================================================== -golangserver *ale-go-golangserver* - -g:ale_go_langserver_executable *g:ale_go_langserver_executable* - *b:ale_go_langserver_executable* - Type: |String| - Default: `'go-langserver'` - - Location of the go-langserver binary file. +govet *ale-go-govet* -g:ale_go_langserver_options *g:ale_go_langserver_options* - *b:ale_go_langserver_options* +g:ale_go_govet_options *g:ale_go_govet_options* + *b:ale_go_govet_options* Type: |String| Default: `''` - Additional options passed to the go-langserver command. Note that the - `-gocodecompletion` option is ignored because it is handled automatically - by the |g:ale_completion_enabled| variable. + This variable can be set to pass additional options to the go vet linter. =============================================================================== -golangci-lint *ale-go-golangci-lint* - -`golangci-lint` is a `lint_file` linter, which only lints files that are -written to disk. This differs from the default behavior of linting the buffer. -See: |ale-lint-file| - -g:ale_go_golangci_lint_executable *g:ale_go_golangci_lint_executable* - *b:ale_go_golangci_lint_executable* - Type: |String| - Default: `'golangci-lint'` - - The executable that will be run for golangci-lint. - +staticcheck *ale-go-staticcheck* -g:ale_go_golangci_lint_options *g:ale_go_golangci_lint_options* - *b:ale_go_golangci_lint_options* +g:ale_go_staticcheck_options *g:ale_go_staticcheck_options* + *b:ale_go_staticcheck_options* Type: |String| - Default: `'--enable-all'` + Default: `''` - This variable can be changed to alter the command-line arguments to the - golangci-lint invocation. + This variable can be set to pass additional options to the staticcheck + linter. -g:ale_go_golangci_lint_package *g:ale_go_golangci_lint_package* - *b:ale_go_golangci_lint_package* +g:ale_go_staticcheck_lint_package *g:ale_go_staticcheck_lint_package* + *b:ale_go_staticcheck_lint_package* Type: |Number| Default: `0` diff --git a/doc/ale-haskell.txt b/doc/ale-haskell.txt index a4db683b..e2073e37 100644 --- a/doc/ale-haskell.txt +++ b/doc/ale-haskell.txt @@ -13,6 +13,16 @@ g:ale_haskell_brittany_executable *g:ale_haskell_brittany_executable* This variable can be changed to use a different executable for brittany. =============================================================================== +floskell *ale-haskell-floskell* + +g:ale_haskell_floskell_executable *g:ale_haskell_floskell_executable* + *b:ale_haskell_floskell_executable* + Type: |String| + Default: `'floskell'` + + This variable can be changed to use a different executable for floskell. + +=============================================================================== ghc *ale-haskell-ghc* g:ale_haskell_ghc_options *g:ale_haskell_ghc_options* @@ -108,6 +118,17 @@ g:ale_haskell_stack_build_options *g:ale_haskell_stack_build_options* programs will be slower unless you separately rebuild them outside of ALE. =============================================================================== +stack-ghc *ale-haskell-stack-ghc* + +g:ale_haskell_stack_ghc_options *g:ale_haskell_stack_ghc_options* + *b:ale_haskell_stack_ghc_options* + Type: |String| + Default: `'-fno-code -v0'` + + This variable can be changed to modify flags given to ghc through `stack + ghc` + +=============================================================================== stylish-haskell *ale-haskell-stylish-haskell* g:ale_haskell_stylish_haskell_executable diff --git a/doc/ale-html.txt b/doc/ale-html.txt index 1d30929f..5d6b20e2 100644 --- a/doc/ale-html.txt +++ b/doc/ale-html.txt @@ -3,6 +3,14 @@ ALE HTML Integration *ale-html-options* =============================================================================== +fecs *ale-html-fecs* + +`fecs` options for HTMl is the same as the options for JavaScript, +and both of them reads `./.fecsrc` as the default configuration file. +See: |ale-javascript-fecs|. + + +=============================================================================== htmlhint *ale-html-htmlhint* g:ale_html_htmlhint_executable *g:ale_html_htmlhint_executable* diff --git a/doc/ale-java.txt b/doc/ale-java.txt index 8e40aea0..2805c9c8 100644 --- a/doc/ale-java.txt +++ b/doc/ale-java.txt @@ -79,14 +79,19 @@ g:ale_java_pmd_options *g:ale_java_pmd_options* 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/vscode-javac. Simply -download the source code and then build the plugin using maven: +language server from https://github.com/georgewfraser/java-language-server. +Simply download the source code and then build a distribution: - mvn package + scripts/link_mac.sh -This generates a out/fat-jar.jar file that contains the language server. To -let ALE use this language server you need to set the g:ale_java_javalsp_jar -variable to the absolute path of this jar file. +or + + scripts/link_windows.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 +g:ale_java_javalsp_executable variable to the absolute path of the java +executable in this directory. g:ale_java_javalsp_executable *g:ale_java_javalsp_executable* *b:ale_java_javalsp_executable* @@ -95,13 +100,45 @@ g:ale_java_javalsp_executable *g:ale_java_javalsp_executable* This variable can be changed to use a different executable for java. -g:ale_java_javalsp_jar *g:ale_java_javalsp_jar* - *b:ale_java_javalsp_jar* + +=============================================================================== +eclipselsp *ale-java-eclipselsp* + +To enable Eclipse LSP linter you need to clone and build the eclipse.jdt.ls +language server from https://github.com/eclipse/eclipse.jdt.ls. Simply +clone the source code repo and then build the plugin: + + ./mvnw clean verify + +Note: currently, the build can only run when launched with JDK 8. JDK 9 or more +recent versions can be used to run the server though. + +After build completes the files required to run the language server will be +located inside the repository folder `eclipse.jdt.ls`. Please ensure to set +|g:ale_java_eclipselsp_path| to the absolute path of that folder. + +You could customize compiler options and code assists of the server. +Under your project folder, modify the file `.settings/org.eclipse.jdt.core.prefs` +with options presented at +https://help.eclipse.org/neon/topic/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/JavaCore.html. + +g:ale_java_eclipselsp_path *g:ale_java_eclipselsp_path* + *b:ale_java_eclipselsp_path* Type: |String| - Default: `'fat-jar.jar'` + Default: `'$HOME/eclipse.jdt.ls'` + + Absolute path to the location of the eclipse.jdt.ls repository folder. Or if + you have VSCode extension installed the absolute path to the VSCode extensions + folder (e.g. $HOME/.vscode/extensions in Linux). + + +g:ale_java_eclipselsp_executable *g:ale_java_eclipse_executable* + *b:ale_java_eclipse_executable* + Type: |String| + Default: `'java'` - Path to the location of the vscode-javac language server plugin. + This variable can be set to change the executable path used for java. =============================================================================== diff --git a/doc/ale-javascript.txt b/doc/ale-javascript.txt index 53a70fd7..ea0a7089 100644 --- a/doc/ale-javascript.txt +++ b/doc/ale-javascript.txt @@ -74,6 +74,33 @@ g:ale_javascript_eslint_suppress_missing_config =============================================================================== +fecs *ale-javascript-fecs* + +`fecs` is a lint tool for HTML/CSS/JavaScript, can be installed via: + + `$ npm install --save-dev fecs` + +And the configuration file is located at `./fecsrc`, see http://fecs.baidu.com +for more options. + + +g:ale_javascript_fecs_executable *g:ale_javascript_fecs_executable* + *b:ale_javascript_fecs_executable* + Type: |String| + Default: `'fecs'` + + See |ale-integrations-local-executables| + + +g:ale_javascript_fecs_use_global *g:ale_javascript_fecs_use_global* + *b:ale_javascript_fecs_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== flow *ale-javascript-flow* g:ale_javascript_flow_executable *g:ale_javascript_flow_executable* diff --git a/doc/ale-json.txt b/doc/ale-json.txt index 6a0a9fae..96499a04 100644 --- a/doc/ale-json.txt +++ b/doc/ale-json.txt @@ -52,7 +52,21 @@ g:ale_json_fixjson_use_global *g:ale_json_fixjson_use_global* =============================================================================== jsonlint *ale-json-jsonlint* -There are no options available. +g:ale_json_jsonlint_executable *g:ale_json_jsonlint_executable* + *b:ale_json_jsonlint_executable* + + Type: |String| + Default: `'jsonlint'` + + The executable that will be run for jsonlint. + +g:ale_json_jsonlint_use_global *g:ale_json_jsonlint_use_global* + *b:ale_json_jsonlint_use_global* + + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| =============================================================================== diff --git a/doc/ale-kotlin.txt b/doc/ale-kotlin.txt index 9f9fd16e..4028531f 100644 --- a/doc/ale-kotlin.txt +++ b/doc/ale-kotlin.txt @@ -84,9 +84,17 @@ g:ale_kotlin_ktlint_rulesets *g:ale_kotlin_ktlint_rulesets* This list should contain paths to ruleset jars and/or strings of maven artifact triples. Example: > - let g:ale_kotlin_ktlint_rulesets = ['/path/to/custom-rulset.jar', + let g:ale_kotlin_ktlint_rulesets = ['/path/to/custom-ruleset.jar', 'com.ktlint.rulesets:mycustomrule:1.0.0'] +g:ale_kotlin_ktlint_options *g:ale_kotlin_ktlint_options* + Type: |String| + Default: `''` + + Additional options to pass to ktlint for both linting and fixing. Example: + > + let g:ale_kotlin_ktlint_options = '--android' + =============================================================================== languageserver *ale-kotlin-languageserver* diff --git a/doc/ale-latex.txt b/doc/ale-latex.txt index 87fbd4e8..bedbabcd 100644 --- a/doc/ale-latex.txt +++ b/doc/ale-latex.txt @@ -9,4 +9,10 @@ See |ale-write-good-options| =============================================================================== +textlint *ale-latex-textlint* + +See |ale-text-textlint| + + +=============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-ocaml.txt b/doc/ale-ocaml.txt index adf17716..8b644c17 100644 --- a/doc/ale-ocaml.txt +++ b/doc/ale-ocaml.txt @@ -51,4 +51,32 @@ g:ale_ocaml_ocamlformat_options *g:ale_ocaml_ocamlformat_options* This variable can be set to pass additional options to the ocamlformat fixer. =============================================================================== +ocp-indent *ale-ocaml-ocp-indent* + +g:ale_ocaml_ocp_indent_executable *g:ale_ocaml_ocp_indent_executable* + *b:ale_ocaml_ocp_indent_executable* + Type: |String| + Default: `ocp-indent` + + This variable can be set to pass the path of the ocp-indent. + +g:ale_ocaml_ocp_indent_options *g:ale_ocaml_ocp_indent_options* + *b:ale_ocaml_ocp_indent_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the ocp-indent. + +g:ale_ocaml_ocp_indent_config *g:ale_ocaml_ocp_indent_config* + *b:ale_ocaml_ocp_indent_config* + Type: |String| + Default: `''` + + This variable can be set to pass additional config to the ocp-indent. + Expand after "--config=". + + "ocp-indent" can also be enabled from ocamlformat config. + + +=============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-php.txt b/doc/ale-php.txt index 83bc0fd5..6f53cead 100644 --- a/doc/ale-php.txt +++ b/doc/ale-php.txt @@ -154,11 +154,13 @@ g:ale_php_phpstan_executable *g:ale_php_phpstan_executable* g:ale_php_phpstan_level *g:ale_php_phpstan_level* *b:ale_php_phpstan_level* - Type: |Number| - Default: `4` + Type: |String| + Default: `''` This variable controls the rule levels. 0 is the loosest and 4 is the - strictest. + strictest. If this option isn't set, the rule level will be controlled by + the configuration file. If no configuration file can be detected, `'4'` will + be used instead. g:ale_php_phpstan_configuration *g:ale_php_phpstan_configuration* diff --git a/doc/ale-powershell.txt b/doc/ale-powershell.txt new file mode 100644 index 00000000..c28ef9ea --- /dev/null +++ b/doc/ale-powershell.txt @@ -0,0 +1,77 @@ +=============================================================================== +ALE PowerShell Integration *ale-powershell-options* + + +=============================================================================== +powershell *ale-powershell-powershell* + +g:ale_powershell_powershell_executable *g:ale_powershell_powershell_executable* + *b:ale_powershell_powershell_executable* + Type: String + Default: `'pwsh'` + + This variable can be changed to use a different executable for powershell. + +> + " Use powershell.exe rather than the default pwsh + let g:ale_powershell_powershell_executable = 'powershell.exe' +> + +=============================================================================== +psscriptanalyzer *ale-powershell-psscriptanalyzer* + +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* + *b:ale_powershell_psscriptanalyzer_executable* + Type: |String| + Default: `'pwsh'` + + This variable sets executable used for powershell. + + For example, on Windows you could set powershell to be Windows Powershell: +> + let g:ale_powershell_psscriptanalyzer_executable = 'powershell.exe' +< + +g:ale_powershell_psscriptanalyzer_module +*g:ale_powershell_psscriptanalyzer_module* + *b:ale_powershell_psscriptanalyzer_module* + Type: |String + Default: `'psscriptanalyzer'` + + This variable sets the name of the psscriptanalyzer module. + for psscriptanalyzer invocation. + + +g:ale_powershell_psscriptanalyzer_exclusions +*g:ale_powershell_psscriptanalyzer_exclusions* + *b:ale_powershell_psscriptanalyzer_exclusions* + Type: |String| + Default: `''` + + Set this variable to exclude test(s) for psscriptanalyzer + (-ExcludeRule option). To exclude more than one option, separate them with + commas. + +> + " Suppress Write-Host and Global vars warnings + let g:ale_powershell_psscriptanalyzer_exclusions = + \ 'PSAvoidUsingWriteHost,PSAvoidGlobalVars' +< + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-python.txt b/doc/ale-python.txt index f3f2801a..dd946ad4 100644 --- a/doc/ale-python.txt +++ b/doc/ale-python.txt @@ -31,6 +31,9 @@ ALE will look for configuration files with the following filenames. > pycodestyle.cfg flake8.cfg .flake8rc + pylama.ini + pylintrc + .pylintrc Pipfile Pipfile.lock < @@ -66,6 +69,56 @@ g:ale_python_autopep8_use_global *g:ale_python_autopep8_use_global* =============================================================================== +bandit *ale-python-bandit* + +g:ale_python_bandit_executable *g:ale_python_bandit_executable* + *b:ale_python_bandit_executable* + Type: |String| + Default: `'bandit'` + + See |ale-integrations-local-executables| + + Set this to `'pipenv'` to invoke `'pipenv` `run` `bandit'`. + + +g:ale_python_bandit_options *g:ale_python_bandit_options* + *b:ale_python_bandit_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the + bandit invocation. + + +g:ale_python_bandit_use_config *g:ale_python_bandit_use_config* + *b:ale_python_bandit_use_config* + Type: |Number| + Default: `1` + + If this variable is true and a `.bandit` file exists in the directory of the + file being checked or a parent directory, an `--ini` option is added to the + `bandit` command for the nearest `.bandit` file. Set this variable false to + disable adding the `--ini` option automatically. + + +g:ale_python_bandit_use_global *g:ale_python_bandit_use_global* + *b:ale_python_bandit_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +g:ale_python_bandit_auto_pipenv *g:ale_python_bandit_auto_pipenv* + *b:ale_python_bandit_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +=============================================================================== black *ale-python-black* g:ale_python_black_executable *g:ale_python_black_executable* @@ -75,7 +128,7 @@ g:ale_python_black_executable *g:ale_python_black_executable* See |ale-integrations-local-executables| -autopep8 + g:ale_python_black_options *g:ale_python_black_options* *b:ale_python_black_options* Type: |String| @@ -92,6 +145,25 @@ g:ale_python_black_use_global *g:ale_python_black_use_global* See |ale-integrations-local-executables| +g:ale_python_black_auto_pipenv *g:ale_python_black_auto_pipenv* + *b:ale_python_black_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + +g:ale_python_black_change_directory *g:ale_python_black_change_directory* + *b:ale_python_black_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, ALE will switch to the directory the Python file being + checked with `black` is in before checking it. This helps `black` find + configuration files more easily. This option can be turned off if you want + to control the directory Python is executed from yourself. + + =============================================================================== flake8 *ale-python-flake8* @@ -392,6 +464,60 @@ g:ale_python_pyflakes_auto_pipenv *g:ale_python_pyflakes_auto_pipenv* =============================================================================== +pylama *ale-python-pylama* + +g:ale_python_pylama_change_directory *g:ale_python_pylama_change_directory* + *b:ale_python_pylama_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, `pylama` will be run from a detected project root, per + |ale-python-root|. This is useful because `pylama` only searches for + configuration files in its current directory and applies file masks using + paths relative to its current directory. This option can be turned off if + you want to control the directory in which `pylama` is executed. + + +g:ale_python_pylama_executable *g:ale_python_pylama_executable* + *b:ale_python_pylama_executable* + Type: |String| + Default: `'pylama'` + + This variable can be changed to modify the executable used for pylama. Set + this to `'pipenv'` to invoke `'pipenv` `run` `pylama'`. + + +g:ale_python_pylama_options *g:ale_python_pylama_options* + *b:ale_python_pylama_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the pylama + invocation. + + +g:ale_python_pylama_use_global *g:ale_python_pylama_use_global* + *b:ale_python_pylama_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + This variable controls whether or not ALE will search for pylama in a + virtualenv directory first. If this variable is set to `1`, then ALE will + always use |g:ale_python_pylama_executable| for the executable path. + + Both variables can be set with `b:` buffer variables instead. + + +g:ale_python_pylama_auto_pipenv *g:ale_python_pylama_auto_pipenv* + *b:ale_python_pylama_auto_pipenv* + Type: |Number| + Default: `0` + + Detect whether the file is inside a pipenv, and set the executable to `pipenv` + if true. This is overridden by a manually-set executable. + + +=============================================================================== pylint *ale-python-pylint* g:ale_python_pylint_change_directory *g:ale_python_pylint_change_directory* @@ -399,10 +525,12 @@ g:ale_python_pylint_change_directory *g:ale_python_pylint_change_directory* Type: |Number| Default: `1` - If set to `1`, ALE will switch to the directory the Python file being - checked with `pylint` is in before checking it. This helps `pylint` 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 `1`, `pylint` will be run from a detected project root, per + |ale-python-root|. Since `pylint` only checks for `pylintrc` in the packages + above its current directory before falling back to user and global `pylintrc` + files, this is necessary for `pylint` to use a project `pylintrc` file, if + present. This option can be turned off if you want to control the directory + Python is executed from yourself. g:ale_python_pylint_executable *g:ale_python_pylint_executable* @@ -485,6 +613,24 @@ g:ale_python_pyls_auto_pipenv *g:ale_python_pyls_auto_pipenv* if true. This is overridden by a manually-set executable. +g:ale_python_pyls_config *g:ale_python_pyls_config* + *b:ale_python_pyls_config* + Type: |Dictionary| + Default: `{}` + + Dictionary with configuration settings for pyls. For example, to disable + the pycodestyle linter: > + { + \ 'pyls': { + \ 'plugins': { + \ 'pycodestyle': { + \ 'enabled': v:false + \ } + \ } + \ }, + \ } +< + =============================================================================== pyre *ale-python-pyre* @@ -540,6 +686,15 @@ g:ale_python_vulture_executable *g:ale_python_vulture_executable* See |ale-integrations-local-executables| +g:ale_python_vulture_options *g:ale_python_vulture_options* + *b:ale_python_vulture_options* + Type: |String| + Default: `''` + + This variable can be changed to add command-line arguments to the vulture + invocation. + + g:ale_python_vulture_use_global *g:ale_python_vulture_use_global* *b:ale_python_vulture_use_global* Type: |Number| diff --git a/doc/ale-r.txt b/doc/ale-r.txt index f85f48fd..b5ccebe5 100644 --- a/doc/ale-r.txt +++ b/doc/ale-r.txt @@ -25,5 +25,21 @@ g:ale_r_lintr_lint_package *g:ale_r_lintr_lint_package* of `lintr::lint`. This prevents erroneous namespace warnings when linting package files. + +=============================================================================== +styler *ale-r-styler* + +g:ale_r_styler_options *g:ale_r_styler_options* + *b:ale_r_styler_options* + Type: |String| + Default: `'styler::tidyverse_style'` + + 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 + for more information. + + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-restructuredtext.txt b/doc/ale-restructuredtext.txt index 02fbc4ad..e308b072 100644 --- a/doc/ale-restructuredtext.txt +++ b/doc/ale-restructuredtext.txt @@ -3,6 +3,20 @@ ALE reStructuredText Integration *ale-restructuredtext-options* =============================================================================== +textlint *ale-restructuredtext-textlint* + +To use textlint at reStructuredText, please install `textlint-plugin-rst`. +https://github.com/jimo1001/textlint-plugin-rst +> + $ npm install textlint-plugin-rst + +To install `textlint-plugin-rst`, `docutils-ast-writer` python package +must be installed. +See: https://github.com/jimo1001/docutils-ast-writer + +See |ale-text-textlint| + +=============================================================================== write-good *ale-restructuredtext-write-good* See |ale-write-good-options| diff --git a/doc/ale-ruby.txt b/doc/ale-ruby.txt index f8a41999..bf971e7c 100644 --- a/doc/ale-ruby.txt +++ b/doc/ale-ruby.txt @@ -130,4 +130,26 @@ g:ale_ruby_solargraph_executable *g:ale_ruby_solargraph_executable* =============================================================================== +standardrb *ale-ruby-standardrb* + +g:ale_ruby_standardrb_executable *g:ale_ruby_standardrb_executable* + *b:ale_ruby_standardrb_executable* + Type: String + Default: `'standardrb'` + + Override the invoked standardrb binary. Set this to `'bundle'` to invoke + `'bundle` `exec` standardrb'. + + +g:ale_ruby_standardrb_options *g:ale_ruby_standardrb_options* + *b:ale_ruby_standardrb_options* + Type: |String| + Default: `''` + + This variable can be change to modify flags given to standardrb. + + +=============================================================================== + +=============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-rust.txt b/doc/ale-rust.txt index 7510dfbd..44a79b18 100644 --- a/doc/ale-rust.txt +++ b/doc/ale-rust.txt @@ -164,14 +164,32 @@ g:ale_rust_rls_executable *g:ale_rust_rls_executable* g:ale_rust_rls_toolchain *g:ale_rust_rls_toolchain* *b:ale_rust_rls_toolchain* Type: |String| - Default: `'nightly'` + Default: `''` This option can be set to change the toolchain used for `rls`. Possible - values include `'nightly'`, `'beta'`, and `'stable'`. + values include `'nightly'`, `'beta'`, `'stable'`, and `''`. When using + option `''`, rls will automatically find the default toolchain set by + rustup. If you want to use `rls` from a specific toolchain version, you may + also use values like `'channel-yyyy-mm-dd-arch-target'` as long as + `'rls +{toolchain_name} -V'` runs correctly in your command line. The `rls` server will only be started once per executable. +g:ale_rust_rls_config *g:ale_rust_rls_config* + *b:ale_rust_rls_config* + Type: |Dictionary| + Default: `{}` + + Dictionary with configuration settings for rls. For example, to force + using clippy as linter: > + { + \ 'rust': { + \ 'clippy_preference': 'on' + \ } + \ } + + =============================================================================== rustc *ale-rust-rustc* diff --git a/doc/ale-sass.txt b/doc/ale-sass.txt index 735f44b2..22d7c472 100644 --- a/doc/ale-sass.txt +++ b/doc/ale-sass.txt @@ -1,5 +1,5 @@ =============================================================================== -ALE SASS Integration *ale-sass-options* +ALE Sass Integration *ale-sass-options* =============================================================================== diff --git a/doc/ale-sh.txt b/doc/ale-sh.txt index 7557e522..3eac9038 100644 --- a/doc/ale-sh.txt +++ b/doc/ale-sh.txt @@ -61,6 +61,30 @@ g:ale_sh_shellcheck_options *g:ale_sh_shellcheck_options* let g:ale_sh_shellcheck_options = '-x' < + +g:ale_sh_shellcheck_change_directory *g:ale_sh_shellcheck_change_directory* + *b:ale_sh_shellcheck_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, ALE will switch to the directory the shell file being + checked with `shellcheck` is in before checking it. This helps `shellcheck` + determine the path to sourced files more easily. This option can be turned + off if you want to control the directory `shellcheck` is executed from + yourself. + + +g:ale_sh_shellcheck_dialect *g:ale_sh_shellcheck_dialect* + *b:ale_sh_shellcheck_dialect* + Type: |String| + Default: `'auto'` + + This variable specifies the shellcheck dialect (`-s` option). The value + `'auto'` causes ALE to detect the dialect automatically, based on the shebang + line (if present) or the value of `b:is_bash`, `b:is_sh`, or `b:is_kornshell` + (set and used by |sh.vim|). + + g:ale_sh_shellcheck_exclusions *g:ale_sh_shellcheck_exclusions* *b:ale_sh_shellcheck_exclusions* Type: |String| diff --git a/doc/ale-sugarss.txt b/doc/ale-sugarss.txt new file mode 100644 index 00000000..8e991e54 --- /dev/null +++ b/doc/ale-sugarss.txt @@ -0,0 +1,31 @@ +=============================================================================== +ALE SugarSS Integration *ale-sugarss-options* + + +=============================================================================== +stylelint *ale-sugarss-stylelint* + +g:ale_sugarss_stylelint_executable *g:ale_sugarss_stylelint_executable* + *b:ale_sugarss_stylelint_executable* + Type: |String| + Default: `'stylelint'` + + See |ale-integrations-local-executables| + +g:ale_sugarss_stylelint_options *g:ale_sugarss_stylelint_options* + *b:ale_sugarss_stylelint_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to stylelint. + +g:ale_sugarss_stylelint_use_global *g:ale_sugarss_stylelint_use_global* + *b:ale_sugarss_stylelint_use_global* + Type: |String| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-supported-languages-and-tools.txt b/doc/ale-supported-languages-and-tools.txt new file mode 100644 index 00000000..d6fbafa6 --- /dev/null +++ b/doc/ale-supported-languages-and-tools.txt @@ -0,0 +1,484 @@ +*ale-supported-languages-and-tools.txt* For Vim version 8.0. +*ale-supported-list* + +ALE Supported Languages and Tools + +=============================================================================== + +The following languages and tools are supported by ALE. + +Notes: + +`^` No linters for text or Vim help filetypes are enabled by default. +`!!` These linters check only files on disk. See |ale-lint-file-linters| + +* Ada + * `gcc` +* Ansible + * `ansible-lint` +* API Blueprint + * `drafter` +* AsciiDoc + * `alex`!! + * `proselint` + * `redpen` + * `textlint` + * `vale` + * `write-good` +* ASM + * `gcc` +* Awk + * `gawk` +* Bash + * `language-server` + * `shell` (-n flag) + * `shellcheck` + * `shfmt` +* BibTeX + * `bibclean` +* Bourne Shell + * `shell` (-n flag) + * `shellcheck` + * `shfmt` +* C + * `ccls` + * `clang` + * `clangd` + * `clang-format` + * `clangtidy`!! + * `cppcheck` + * `cpplint`!! + * `cquery` + * `flawfinder` + * `gcc` + * `uncrustify` +* C# + * `mcs` + * `mcsc`!! + * `uncrustify` +* C++ (filetype cpp) + * `ccls` + * `clang` + * `clangcheck`!! + * `clangd` + * `clang-format` + * `clangtidy`!! + * `clazy`!! + * `cppcheck` + * `cpplint`!! + * `cquery` + * `flawfinder` + * `gcc` + * `uncrustify` +* Chef + * `cookstyle` + * `foodcritic` +* Clojure + * `clj-kondo` + * `joker` +* CloudFormation + * `cfn-python-lint` +* CMake + * `cmake-format` + * `cmakelint` +* CoffeeScript + * `coffee` + * `coffeelint` +* Crystal + * `ameba`!! + * `crystal`!! +* CSS + * `csslint` + * `fecs` + * `prettier` + * `stylelint` +* Cucumber + * `cucumber` +* CUDA + * `nvcc`!! +* Cypher + * `cypher-lint` +* Cython (pyrex filetype) + * `cython` +* D + * `dls` + * `dmd` + * `uncrustify` +* Dafny + * `dafny`!! +* Dart + * `dartanalyzer`!! + * `dartfmt`!! + * `language_server` +* Dockerfile + * `dockerfile_lint` + * `hadolint` +* Elixir + * `credo` + * `dialyxir` + * `dogma` + * `elixir-ls` + * `mix`!! +* Elm + * `elm-format` + * `elm-lsp` + * `elm-make` +* Erb + * `erb` + * `erubi` + * `erubis` + * `ruumba` +* Erlang + * `erlc` + * `SyntaxErl` +* Fish + * `fish` (-n flag) +* Fortran + * `gcc` + * `language_server` +* Fountain + * `proselint` +* FusionScript + * `fusion-lint` +* Git Commit Messages + * `gitlint` +* GLSL + * glslang + * `glslls` +* Go + * `bingo` + * `go build`!! + * `gofmt` + * `goimports` + * `golangci-lint`!! + * `golangserver` + * `golint` + * `gometalinter`!! + * `go mod`!! + * `gopls` + * `gosimple`!! + * `gotype`!! + * `go vet`!! + * `staticcheck`!! +* GraphQL + * `eslint` + * `gqlint` + * `prettier` +* Hack + * `hack` + * `hackfmt` + * `hhast` +* Haml + * `haml-lint` +* Handlebars + * `ember-template-lint` +* Haskell + * `brittany` + * `cabal-ghc` + * `floskell` + * `ghc` + * `ghc-mod` + * `hdevtools` + * `hfmt` + * `hie` + * `hlint` + * `stack-build`!! + * `stack-ghc` + * `stylish-haskell` +* HCL + * `terraform-fmt` +* HTML + * `alex`!! + * `fecs` + * `HTMLHint` + * `prettier` + * `proselint` + * `tidy` + * `write-good` +* Idris + * `idris` +* ISPC + * `ispc`!! +* Java + * `checkstyle` + * `eclipselsp` + * `google-java-format` + * `javac` + * `javalsp` + * `PMD` + * `uncrustify` +* JavaScript + * `eslint` + * `fecs` + * `flow` + * `jscs` + * `jshint` + * `prettier` + * `prettier-eslint` + * `prettier-standard` + * `standard` + * `tsserver` + * `xo` +* JSON + * `fixjson` + * `jq` + * `jsonlint` + * `prettier` +* Julia + * `languageserver` +* Kotlin + * `kotlinc`!! + * `ktlint`!! + * `languageserver` +* LaTeX (tex) + * `alex`!! + * `chktex` + * `lacheck` + * `proselint` + * `redpen` + * `textlint` + * `vale` + * `write-good` +* Less + * `lessc` + * `prettier` + * `stylelint` +* LLVM + * `llc` +* Lua + * `luac` + * `luacheck` +* Mail + * `alex`!! + * `languagetool`!! + * `proselint` + * `vale` +* Make + * `checkmake` +* Markdown + * `alex`!! + * `languagetool`!! + * `markdownlint`!! + * `mdl` + * `prettier` + * `proselint` + * `redpen` + * `remark-lint` + * `textlint` + * `vale` + * `write-good` +* MATLAB + * `mlint` +* Mercury + * `mmc`!! +* NASM + * `nasm`!! +* Nim + * `nim check`!! +* nix + * `nix-instantiate` +* nroff + * `alex`!! + * `proselint` + * `write-good` +* Objective-C + * `ccls` + * `clang` + * `clangd` + * `uncrustify` +* Objective-C++ + * `clang` + * `clangd` + * `uncrustify` +* OCaml + * `merlin` (see |ale-ocaml-merlin|) + * `ocamlformat` + * `ocp-indent` + * `ols` +* Pawn + * `uncrustify` +* Perl + * `perl -c` + * `perl-critic` + * `perltidy` +* Perl6 + * `perl6 -c` +* PHP + * `langserver` + * `phan` + * `phpcbf` + * `phpcs` + * `php-cs-fixer` + * `php -l` + * `phpmd` + * `phpstan` + * `psalm`!! +* PO + * `alex`!! + * `msgfmt` + * `proselint` + * `write-good` +* Pod + * `alex`!! + * `proselint` + * `write-good` +* Pony + * `ponyc` +* PowerShell + * `powershell` + * `psscriptanalyzer` +* Prolog + * `swipl` +* proto + * `protoc-gen-lint` +* Pug + * `pug-lint` +* Puppet + * `languageserver` + * `puppet` + * `puppet-lint` +* Python + * `autopep8` + * `bandit` + * `black` + * `flake8` + * `isort` + * `mypy` + * `prospector` + * `pycodestyle` + * `pydocstyle` + * `pyflakes` + * `pylama`!! + * `pylint`!! + * `pyls` + * `pyre` + * `vulture`!! + * `yapf` +* QML + * `qmlfmt` + * `qmllint` +* R + * `lintr` + * `styler` +* Racket + * `raco` +* ReasonML + * `merlin` + * `ols` + * `refmt` +* reStructuredText + * `alex`!! + * `proselint` + * `redpen` + * `rstcheck` + * `textlint` + * `vale` + * `write-good` +* Re:VIEW + * `redpen` +* RPM spec + * `rpmlint` +* Ruby + * `brakeman` + * `rails_best_practices`!! + * `reek` + * `rubocop` + * `ruby` + * `rufo` + * `solargraph` + * `standardrb` +* Rust + * `cargo`!! + * `rls` + * `rustc` (see |ale-integration-rust|) + * `rustfmt` +* Sass + * `sass-lint` + * `stylelint` +* Scala + * `fsc` + * `sbtserver` + * `scalac` + * `scalafmt` + * `scalastyle` +* SCSS + * `prettier` + * `sass-lint` + * `scss-lint` + * `stylelint` +* Slim + * `slim-lint` +* SML + * `smlnj` +* Solidity + * `solhint` + * `solium` +* SQL + * `sqlfmt` + * `sqlint` +* Stylus + * `stylelint` +* SugarSS + * `stylelint` +* Swift + * `sourcekit-lsp` + * `swiftformat` + * `swiftlint` +* Tcl + * `nagelfar`!! +* Terraform + * `fmt` + * `tflint` +* Texinfo + * `alex`!! + * `proselint` + * `write-good` +* Text^ + * `alex`!! + * `languagetool`!! + * `proselint` + * `redpen` + * `textlint` + * `vale` + * `write-good` +* Thrift + * `thrift` +* TypeScript + * `eslint` + * `fecs` + * `prettier` + * `tslint` + * `tsserver` + * `typecheck` +* VALA + * `uncrustify` +* Verilog + * `iverilog` + * `verilator` + * `vlog` + * `xvlog` +* VHDL + * `ghdl` + * `vcom` + * `xvhdl` +* Vim + * `vint` +* Vim help^ + * `alex`!! + * `proselint` + * `write-good` +* Vue + * `prettier` + * `vls` +* XHTML + * `alex`!! + * `proselint` + * `write-good` +* XML + * `xmllint` +* YAML + * `prettier` + * `swaglint` + * `yamllint` +* YANG + * `yang-lsp` diff --git a/doc/ale-swift.txt b/doc/ale-swift.txt new file mode 100644 index 00000000..8fa0c06c --- /dev/null +++ b/doc/ale-swift.txt @@ -0,0 +1,21 @@ +=============================================================================== +ALE Swift Integration *ale-swift-options* + + +=============================================================================== +sourcekitlsp *ale-swift-sourcekitlsp* + +To enable the SourceKit-LSP you need to install and build the executable as +described here: https://github.com/apple/sourcekit-lsp#building-sourcekit-lsp + + +g:ale_sourcekit_lsp_executable *g:ale_sourcekit_lsp_executable* + *b:ale_sourcekit_lsp_executable* + Type: |String| + Default: `'sourcekit-lsp'` + + See |ale-integrations-local-executables| + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: + diff --git a/doc/ale-tex.txt b/doc/ale-tex.txt index 24aa3112..b1b09117 100644 --- a/doc/ale-tex.txt +++ b/doc/ale-tex.txt @@ -32,5 +32,26 @@ g:ale_lacheck_executable *g:ale_lacheck_executable* This variable can be changed to change the path to lacheck. + +=============================================================================== +latexindent *ale-tex-latexindent* + +g:ale_tex_latexindent_executable *g:ale_tex_latexindent_executable* + *b:ale_tex_latexindent_executable* + Type: |String| + Default: `'latexindent'` + + This variable can be changed to change the path to latexindent. + + +g:ale_tex_latexindent_options *g:ale_tex_latexindent_options* + *b:ale_tex_latexindent_options* + Type: |String| + Default: `''` + + This variable can be changed to modify flags given to latexindent. + + + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-verilog.txt b/doc/ale-verilog.txt index 2b8ce5e2..94b820b8 100644 --- a/doc/ale-verilog.txt +++ b/doc/ale-verilog.txt @@ -3,7 +3,7 @@ ALE Verilog/SystemVerilog Integration *ale-verilog-options* =============================================================================== -ALE can use two different linters for Verilog HDL: +ALE can use four different linters for Verilog HDL: iverilog: Using `iverilog -t null -Wall` @@ -11,6 +11,12 @@ ALE can use two different linters for Verilog HDL: verilator Using `verilator --lint-only -Wall` + ModelSim/Questa + Using `vlog -quiet -lint` + + Vivado + Using `xvlog` + By default, both 'verilog' and 'systemverilog' filetypes are checked. You can limit 'systemverilog' files to be checked using only 'verilator' by @@ -20,6 +26,20 @@ defining 'g:ale_linters' variable: \ let g:ale_linters = {'systemverilog' : ['verilator'],} < +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 +holistic analysis of a file (e.g. a design with components, packages, or other +code defined external to the current file as part of a larger project) or +when wanting to simply pass an alternative location for the auto-generated +work directories (such as '/tmp') so as to not muddle the current directory. +Since these type of linters often use this work directory for holding compiled +design data as part of a single build process, they sometimes cannot handle +the frequent, asynchronous application launches when linting while text is +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. + =============================================================================== iverilog *ale-verilog-iverilog* @@ -39,5 +59,44 @@ g:ale_verilog_verilator_options *g:ale_verilog_verilator_options* For example `'-sv --default-language "1800-2012"'` if you want to enable SystemVerilog parsing and select the 2012 version of the language. + +=============================================================================== +vlog *ale-verilog-vlog* + +g:ale_verilog_vlog_executable *g:ale_verilog_vlog_executable* + *b:ale_verilog_vlog_executable* + Type: |String| + Default: `'vlog'` + + This variable can be changed to the path to the 'vlog' executable. + + +g:ale_verilog_vlog_options *g:ale_verilog_vlog_options* + *b:ale_verilog_vlog_options* + Type: |String| + Default: `'-quiet -lint'` + + This variable can be changed to modify the flags/options passed to 'vlog'. + + +=============================================================================== +xvlog *ale-verilog-xvlog* + +g:ale_verilog_xvlog_executable *g:ale_verilog_xvlog_executable* + *b:ale_verilog_xvlog_executable* + Type: |String| + Default: `'xvlog'` + + This variable can be changed to the path to the 'xvlog' executable. + + +g:ale_verilog_xvlog_options *g:ale_verilog_xvlog_options* + *b:ale_verilog_xvlog_options* + Type: |String| + Default: `''` + + This variable can be changed to modify the flags/options passed to 'xvlog'. + + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-vhdl.txt b/doc/ale-vhdl.txt new file mode 100644 index 00000000..3fea947d --- /dev/null +++ b/doc/ale-vhdl.txt @@ -0,0 +1,92 @@ +=============================================================================== +ALE VHDL Integration *ale-vhdl-options* + + +=============================================================================== +ALE can use three different linters for VHDL: + + iverilog: + Using `iverilog -t null -Wall` + + ModelSim/Questa + Using `vcom -2008 -quiet -lint` + + 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. + +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 +holistic analysis of a file (e.g. a design with components, packages, or other +code defined external to the current file as part of a larger project) or +when wanting to simply pass an alternative location for the auto-generated +work directories (such as '/tmp') so as to not muddle the current directory. +Since these type of linters often use this work directory for holding compiled +design data as part of a single build process, they sometimes cannot handle +the frequent, asynchronous application launches when linting while text is +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. + +=============================================================================== +ghdl *ale-vhdl-ghdl* + +g:ale_vhdl_ghdl_executable *g:ale_vhdl_ghdl_executable* + *b:ale_vhdl_ghdl_executable* + Type: |String| + Default: `'ghdl'` + + This variable can be changed to the path to the 'ghdl' executable. + + +g:ale_vhdl_ghdl_options *g:ale_vhdl_ghdl_options* + *b:ale_vhdl_ghdl_options* + Type: |String| + Default: `'--std=08'` + + This variable can be changed to modify the flags/options passed to 'ghdl'. + + +=============================================================================== +vcom *ale-vhdl-vcom* + +g:ale_vhdl_vcom_executable *g:ale_vhdl_vcom_executable* + *b:ale_vhdl_vcom_executable* + Type: |String| + Default: `'vcom'` + + This variable can be changed to the path to the 'vcom' executable. + + +g:ale_vhdl_vcom_options *g:ale_vhdl_vcom_options* + *b:ale_vhdl_vcom_options* + Type: |String| + Default: `'-2008 -quiet -lint'` + + This variable can be changed to modify the flags/options passed to 'vcom'. + + +=============================================================================== +xvhdl *ale-vhdl-xvhdl* + +g:ale_vhdl_xvhdl_executable *g:ale_vhdl_xvhdl_executable* + *b:ale_vhdl_xvhdl_executable* + Type: |String| + Default: `'xvhdl'` + + This variable can be changed to the path to the 'xvhdl' executable. + + +g:ale_vhdl_xvhdl_options *g:ale_vhdl_xvhdl_options* + *b:ale_vhdl_xvhdl_options* + Type: |String| + Default: `'--2008'` + + This variable can be changed to modify the flags/options passed to 'xvhdl'. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale.txt b/doc/ale.txt index 68d685d9..b777e575 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -1,4 +1,4 @@ -*ale.txt* For Vim version 8.0. +*ale.txt* Plugin to lint and fix files asynchronously *ale* ALE - Asynchronous Lint Engine @@ -14,351 +14,17 @@ CONTENTS *ale-contents* 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| + 5.3 Go To Type Definition.............|ale-go-to-type-definition| + 5.4 Find References...................|ale-find-references| + 5.5 Hovering..........................|ale-hover| + 5.6 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| - ada...................................|ale-ada-options| - gcc.................................|ale-ada-gcc| - ansible...............................|ale-ansible-options| - ansible-lint........................|ale-ansible-ansible-lint| - asciidoc..............................|ale-asciidoc-options| - write-good..........................|ale-asciidoc-write-good| - asm...................................|ale-asm-options| - gcc.................................|ale-asm-gcc| - awk...................................|ale-awk-options| - gawk................................|ale-awk-gawk| - bib...................................|ale-bib-options| - bibclean............................|ale-bib-bibclean| - c.....................................|ale-c-options| - clang...............................|ale-c-clang| - 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| - foodcritic..........................|ale-chef-foodcritic| - clojure...............................|ale-clojure-options| - joker...............................|ale-clojure-joker| - cloudformation........................|ale-cloudformation-options| - cfn-python-lint.....................|ale-cloudformation-cfn-python-lint| - cmake.................................|ale-cmake-options| - cmakelint...........................|ale-cmake-cmakelint| - cpp...................................|ale-cpp-options| - clang...............................|ale-cpp-clang| - clangd..............................|ale-cpp-clangd| - clangcheck..........................|ale-cpp-clangcheck| - clang-format........................|ale-cpp-clangformat| - clangtidy...........................|ale-cpp-clangtidy| - clazy...............................|ale-cpp-clazy| - cppcheck............................|ale-cpp-cppcheck| - 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| - mcs.................................|ale-cs-mcs| - mcsc................................|ale-cs-mcsc| - uncrustify..........................|ale-cs-uncrustify| - css...................................|ale-css-options| - prettier............................|ale-css-prettier| - stylelint...........................|ale-css-stylelint| - 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| - erlang................................|ale-erlang-options| - erlc................................|ale-erlang-erlc| - syntaxerl...........................|ale-erlang-syntaxerl| - eruby.................................|ale-eruby-options| - ruumba..............................|ale-eruby-ruumba| - fish..................................|ale-fish-options| - fortran...............................|ale-fortran-options| - gcc.................................|ale-fortran-gcc| - language_server.....................|ale-fortran-language-server| - fountain..............................|ale-fountain-options| - fusionscript..........................|ale-fuse-options| - fusion-lint.........................|ale-fuse-fusionlint| - git commit............................|ale-gitcommit-options| - gitlint.............................|ale-gitcommit-gitlint| - glsl..................................|ale-glsl-options| - glslang.............................|ale-glsl-glslang| - glslls..............................|ale-glsl-glslls| - go....................................|ale-go-options| - gobuild.............................|ale-go-gobuild| - gofmt...............................|ale-go-gofmt| - golint..............................|ale-go-golint| - govet...............................|ale-go-govet| - gometalinter........................|ale-go-gometalinter| - staticcheck.........................|ale-go-staticcheck| - golangserver........................|ale-go-golangserver| - golangci-lint.......................|ale-go-golangci-lint| - graphql...............................|ale-graphql-options| - eslint..............................|ale-graphql-eslint| - gqlint..............................|ale-graphql-gqlint| - prettier............................|ale-graphql-prettier| - hack..................................|ale-hack-options| - hack................................|ale-hack-hack| - hackfmt.............................|ale-hack-hackfmt| - hhast...............................|ale-hack-hhast| - handlebars............................|ale-handlebars-options| - ember-template-lint.................|ale-handlebars-embertemplatelint| - haskell...............................|ale-haskell-options| - brittany............................|ale-haskell-brittany| - ghc.................................|ale-haskell-ghc| - ghc-mod.............................|ale-haskell-ghc-mod| - cabal-ghc...........................|ale-haskell-cabal-ghc| - hdevtools...........................|ale-haskell-hdevtools| - hfmt................................|ale-haskell-hfmt| - hlint...............................|ale-haskell-hlint| - 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| - prettier............................|ale-html-prettier| - stylelint...........................|ale-html-stylelint| - write-good..........................|ale-html-write-good| - idris.................................|ale-idris-options| - idris...............................|ale-idris-idris| - ispc..................................|ale-ispc-options| - ispc................................|ale-ispc-ispc| - java..................................|ale-java-options| - checkstyle..........................|ale-java-checkstyle| - javac...............................|ale-java-javac| - google-java-format..................|ale-java-google-java-format| - pmd.................................|ale-java-pmd| - javalsp.............................|ale-java-javalsp| - uncrustify..........................|ale-java-uncrustify| - javascript............................|ale-javascript-options| - eslint..............................|ale-javascript-eslint| - flow................................|ale-javascript-flow| - importjs............................|ale-javascript-importjs| - jscs................................|ale-javascript-jscs| - jshint..............................|ale-javascript-jshint| - prettier............................|ale-javascript-prettier| - prettier-eslint.....................|ale-javascript-prettier-eslint| - prettier-standard...................|ale-javascript-prettier-standard| - standard............................|ale-javascript-standard| - xo..................................|ale-javascript-xo| - json..................................|ale-json-options| - fixjson.............................|ale-json-fixjson| - jsonlint............................|ale-json-jsonlint| - jq..................................|ale-json-jq| - prettier............................|ale-json-prettier| - julia.................................|ale-julia-options| - languageserver......................|ale-julia-languageserver| - kotlin................................|ale-kotlin-options| - kotlinc.............................|ale-kotlin-kotlinc| - ktlint..............................|ale-kotlin-ktlint| - languageserver......................|ale-kotlin-languageserver| - latex.................................|ale-latex-options| - write-good..........................|ale-latex-write-good| - less..................................|ale-less-options| - lessc...............................|ale-less-lessc| - prettier............................|ale-less-prettier| - stylelint...........................|ale-less-stylelint| - llvm..................................|ale-llvm-options| - llc.................................|ale-llvm-llc| - lua...................................|ale-lua-options| - luac................................|ale-lua-luac| - luacheck............................|ale-lua-luacheck| - markdown..............................|ale-markdown-options| - mdl.................................|ale-markdown-mdl| - prettier............................|ale-markdown-prettier| - remark-lint.........................|ale-markdown-remark-lint| - textlint............................|ale-markdown-textlint| - write-good..........................|ale-markdown-write-good| - mercury...............................|ale-mercury-options| - mmc.................................|ale-mercury-mmc| - nasm..................................|ale-nasm-options| - nasm................................|ale-nasm-nasm| - nroff.................................|ale-nroff-options| - write-good..........................|ale-nroff-write-good| - objc..................................|ale-objc-options| - clang...............................|ale-objc-clang| - clangd..............................|ale-objc-clangd| - uncrustify..........................|ale-objc-uncrustify| - ccls................................|ale-objc-ccls| - objcpp................................|ale-objcpp-options| - clang...............................|ale-objcpp-clang| - clangd..............................|ale-objcpp-clangd| - uncrustify..........................|ale-objcpp-uncrustify| - ocaml.................................|ale-ocaml-options| - merlin..............................|ale-ocaml-merlin| - ols.................................|ale-ocaml-ols| - ocamlformat.........................|ale-ocaml-ocamlformat| - pawn..................................|ale-pawn-options| - uncrustify..........................|ale-pawn-uncrustify| - perl..................................|ale-perl-options| - 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| - phpcbf..............................|ale-php-phpcbf| - phpcs...............................|ale-php-phpcs| - phpmd...............................|ale-php-phpmd| - phpstan.............................|ale-php-phpstan| - psalm...............................|ale-php-psalm| - php-cs-fixer........................|ale-php-php-cs-fixer| - php.................................|ale-php-php| - po....................................|ale-po-options| - write-good..........................|ale-po-write-good| - pod...................................|ale-pod-options| - 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| - puglint.............................|ale-pug-puglint| - puppet................................|ale-puppet-options| - puppet..............................|ale-puppet-puppet| - puppetlint..........................|ale-puppet-puppetlint| - puppet-languageserver...............|ale-puppet-languageserver| - pyrex (cython)........................|ale-pyrex-options| - cython..............................|ale-pyrex-cython| - python................................|ale-python-options| - autopep8............................|ale-python-autopep8| - black...............................|ale-python-black| - flake8..............................|ale-python-flake8| - isort...............................|ale-python-isort| - mypy................................|ale-python-mypy| - prospector..........................|ale-python-prospector| - pycodestyle.........................|ale-python-pycodestyle| - pydocstyle..........................|ale-python-pydocstyle| - pyflakes............................|ale-python-pyflakes| - pylint..............................|ale-python-pylint| - pyls................................|ale-python-pyls| - pyre................................|ale-python-pyre| - vulture.............................|ale-python-vulture| - yapf................................|ale-python-yapf| - qml...................................|ale-qml-options| - qmlfmt..............................|ale-qml-qmlfmt| - r.....................................|ale-r-options| - lintr...............................|ale-r-lintr| - reasonml..............................|ale-reasonml-options| - merlin..............................|ale-reasonml-merlin| - ols.................................|ale-reasonml-ols| - refmt...............................|ale-reasonml-refmt| - restructuredtext......................|ale-restructuredtext-options| - write-good..........................|ale-restructuredtext-write-good| - ruby..................................|ale-ruby-options| - brakeman............................|ale-ruby-brakeman| - rails_best_practices................|ale-ruby-rails_best_practices| - reek................................|ale-ruby-reek| - rubocop.............................|ale-ruby-rubocop| - ruby................................|ale-ruby-ruby| - rufo................................|ale-ruby-rufo| - solargraph..........................|ale-ruby-solargraph| - rust..................................|ale-rust-options| - cargo...............................|ale-rust-cargo| - rls.................................|ale-rust-rls| - rustc...............................|ale-rust-rustc| - rustfmt.............................|ale-rust-rustfmt| - sass..................................|ale-sass-options| - sasslint............................|ale-sass-sasslint| - stylelint...........................|ale-sass-stylelint| - scala.................................|ale-scala-options| - sbtserver...........................|ale-scala-sbtserver| - scalafmt............................|ale-scala-scalafmt| - scalastyle..........................|ale-scala-scalastyle| - scss..................................|ale-scss-options| - prettier............................|ale-scss-prettier| - sasslint............................|ale-scss-sasslint| - stylelint...........................|ale-scss-stylelint| - sh....................................|ale-sh-options| - sh-language-server..................|ale-sh-language-server| - shell...............................|ale-sh-shell| - shellcheck..........................|ale-sh-shellcheck| - shfmt...............................|ale-sh-shfmt| - sml...................................|ale-sml-options| - smlnj...............................|ale-sml-smlnj| - solidity..............................|ale-solidity-options| - solhint.............................|ale-solidity-solhint| - solium..............................|ale-solidity-solium| - spec..................................|ale-spec-options| - rpmlint.............................|ale-spec-rpmlint| - sql...................................|ale-sql-options| - sqlfmt..............................|ale-sql-sqlfmt| - stylus................................|ale-stylus-options| - stylelint...........................|ale-stylus-stylelint| - 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| - lacheck.............................|ale-tex-lacheck| - texinfo...............................|ale-texinfo-options| - write-good..........................|ale-texinfo-write-good| - text..................................|ale-text-options| - textlint............................|ale-text-textlint| - write-good..........................|ale-text-write-good| - thrift................................|ale-thrift-options| - thrift..............................|ale-thrift-thrift| - typescript............................|ale-typescript-options| - eslint..............................|ale-typescript-eslint| - prettier............................|ale-typescript-prettier| - tslint..............................|ale-typescript-tslint| - tsserver............................|ale-typescript-tsserver| - vala..................................|ale-vala-options| - uncrustify..........................|ale-vala-uncrustify| - verilog/systemverilog.................|ale-verilog-options| - iverilog............................|ale-verilog-iverilog| - verilator...........................|ale-verilog-verilator| - vim...................................|ale-vim-options| - vint................................|ale-vim-vint| - vim help..............................|ale-vim-help-options| - write-good..........................|ale-vim-help-write-good| - vue...................................|ale-vue-options| - prettier............................|ale-vue-prettier| - vls.................................|ale-vue-vls| - xhtml.................................|ale-xhtml-options| - write-good..........................|ale-xhtml-write-good| - xml...................................|ale-xml-options| - xmllint.............................|ale-xml-xmllint| - yaml..................................|ale-yaml-options| - prettier............................|ale-yaml-prettier| - swaglint............................|ale-yaml-swaglint| - yamllint............................|ale-yaml-yamllint| - yang..................................|ale-yang-options| - yang-lsp............................|ale-yang-lsp| + 7. Linter/Fixer Options.................|ale-integration-options| + 7.1 Options for alex..................|ale-alex-options| + 7.2 Options for languagetool..........|ale-languagetool-options| + 7.3 Options for write-good............|ale-write-good-options| + 7.4 Other Linter/Fixer Options........|ale-other-integration-options| 8. Commands/Keybinds....................|ale-commands| 9. API..................................|ale-api| 10. Special Thanks......................|ale-special-thanks| @@ -394,124 +60,8 @@ developer documentation. See |ale-development| =============================================================================== 2. Supported Languages & Tools *ale-support* -The following languages and tools are supported. - -Notes: - -`^` No linters for text or Vim help filetypes are enabled by default. -`!!` These linters check only files on disk. See |ale-lint-file-linters| - -* Ada: `gcc` -* ASM: `gcc` -* Ansible: `ansible-lint` -* API Blueprint: `drafter` -* AsciiDoc: `alex`!!, `proselint`, `redpen`, `write-good`, `vale` -* Awk: `gawk` -* Bash: `language-server`, `shell` (-n flag), `shellcheck`, `shfmt` -* BibTeX: `bibclean` -* Bourne Shell: `shell` (-n flag), `shellcheck`, `shfmt` -* C: `cppcheck`, `cpplint`!!, `clang`, `clangd`, `clangtidy`!!, `clang-format`, `cquery`, `flawfinder`, `gcc`, `uncrustify`, `ccls` -* C++ (filetype cpp): `clang`, `clangd`, `clangcheck`!!, `clangtidy`!!, `clang-format`, `clazy`!!, `cppcheck`, `cpplint`!!, `cquery`, `flawfinder`, `gcc`, `uncrustify`, `ccls` -* CUDA: `nvcc`!! -* C#: `mcs`, `mcsc`!!, `uncrustify` -* Chef: `foodcritic` -* Clojure: `joker` -* CloudFormation: `cfn-python-lint` -* CMake: `cmakelint` -* CoffeeScript: `coffee`, `coffeelint` -* Crystal: `crystal`!! -* CSS: `csslint`, `prettier`, `stylelint` -* Cucumber: `cucumber` -* Cython (pyrex filetype): `cython` -* D: `dls`, `dmd`, `uncrustify` -* Dafny: `dafny`!! -* Dart: `dartanalyzer`!!, `language_server`, dartfmt!! -* Dockerfile: `dockerfile_lint`, `hadolint` -* Elixir: `credo`, `dialyxir`, `dogma`, `mix`!!, `elixir-ls` -* Elm: `elm-format, elm-make` -* Erb: `erb`, `erubi`, `erubis`, `ruumba` -* Erlang: `erlc`, `SyntaxErl` -* Fish: `fish` (-n flag) -* Fortran: `gcc`, `language_server` -* Fountain: `proselint` -* FusionScript: `fusion-lint` -* Git Commit Messages: `gitlint` -* GLSL: glslang, `glslls` -* Go: `gofmt`, `goimports`, `go mod`!!, `go vet`!!, `golint`, `gotype`!!, `gometalinter`!!, `go build`!!, `gosimple`!!, `staticcheck`!!, `golangserver`, `golangci-lint`!! -* GraphQL: `eslint`, `gqlint`, `prettier` -* Hack: `hack`, `hackfmt`, `hhast` -* 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`, `prettier`, `write-good` -* Idris: `idris` -* ISPC: `ispc`!! -* Java: `checkstyle`, `javac`, `google-java-format`, `PMD`, `javalsp`, `uncrustify` -* JavaScript: `eslint`, `flow`, `jscs`, `jshint`, `prettier`, `prettier-eslint`, `prettier-standard`, `standard`, `xo` -* JSON: `fixjson`, `jsonlint`, `jq`, `prettier` -* Julia: `languageserver` -* Kotlin: `kotlinc`!!, `ktlint`!!, `languageserver` -* LaTeX (tex): `alex`!!, `chktex`, `lacheck`, `proselint`, `redpen`, `vale`, `write-good` -* Less: `lessc`, `prettier`, `stylelint` -* LLVM: `llc` -* Lua: `luac`, `luacheck` -* Mail: `alex`!!, `proselint`, `vale` -* Make: `checkmake` -* Markdown: `alex`!!, `markdownlint`!!, `mdl`, `prettier`, `proselint`, `redpen`, `remark-lint`, `textlint`, `vale`, `write-good` -* MATLAB: `mlint` -* Mercury: `mmc`!! -* NASM: `nasm`!! -* Nim: `nim check`!! -* nix: `nix-instantiate` -* nroff: `alex`!!, `proselint`, `write-good` -* Objective-C: `clang`, `clangd`, `uncrustify`, `ccls` -* Objective-C++: `clang`, `clangd`, `uncrustify` -* 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` -* Python: `autopep8`, `black`, `flake8`, `isort`, `mypy`, `prospector`, `pycodestyle`, `pydocstyle`, `pyls`, `pyre`, `pylint`!!, `vulture`!!, `yapf` -* QML: `qmlfmt`, `qmllint` -* R: `lintr` -* ReasonML: `merlin`, `ols`, `refmt` -* reStructuredText: `alex`!!, `proselint`, `redpen`, `rstcheck`, `vale`, `write-good` -* Re:VIEW: `redpen` -* RPM spec: `rpmlint` -* Ruby: `brakeman`, `rails_best_practices`!!, `reek`, `rubocop`, `ruby`, `rufo`, `solargraph` -* Rust: `cargo`!!, `rls`, `rustc` (see |ale-integration-rust|), `rustfmt` -* SASS: `sass-lint`, `stylelint` -* SCSS: `prettier`, `sass-lint`, `scss-lint`, `stylelint` -* Scala: `fsc`, `sbtserver`, `scalac`, `scalafmt`, `scalastyle` -* Slim: `slim-lint` -* SML: `smlnj` -* Solidity: `solhint`, `solium` -* Stylus: `stylelint` -* SQL: `sqlint`, `sqlfmt` -* Swift: `swiftlint`, `swiftformat` -* Tcl: `nagelfar`!! -* Terraform: `fmt`, `tflint` -* Texinfo: `alex`!!, `proselint`, `write-good` -* Text^: `alex`!!, `proselint`, `redpen`, `textlint`, `vale`, `write-good` -* Thrift: `thrift` -* TypeScript: `eslint`, `prettier`, `tslint`, `tsserver`, `typecheck` -* VALA: `uncrustify` -* Verilog: `iverilog`, `verilator` -* Vim: `vint` -* Vim help^: `alex`!!, `proselint`, `write-good` -* Vue: `prettier`, `vls` -* XHTML: `alex`!!, `proselint`, `write-good` -* XML: `xmllint` -* YAML: `prettier`, `swaglint`, `yamllint` -* YANG: `yang-lsp` +ALE supports a wide variety of languages and tools. See |ale-supported-list| +for the full list. =============================================================================== 3. Linting *ale-lint* @@ -676,8 +226,8 @@ for a function set in the ALE fixer registry. Each function for fixing errors must accept either one argument `(buffer)` or two arguments `(buffer, lines)`, representing the buffer being fixed and the lines to fix. The functions must return either `0`, for changing nothing, a -|List| for new lines to set, or a |Dictionary| for describing a command to be -run in the background. +|List| for new lines to set, a |Dictionary| for describing a command to be +run in the background, or the result of |ale#command#Run()|. Functions receiving a variable number of arguments will not receive the second argument `lines`. Functions should name two arguments if the `lines` argument @@ -707,26 +257,6 @@ are supported for running the commands. A |List| of |String|s must be returned. - `chain_with` An optional key for defining a callback to call next. - - The callback must accept two or three arguments, - `(buffer, output)` or `(buffer, output, input)` . - Functions receiving a variable number of arguments will - only receive the first two values. The `output` argument - will contain the lines of output from the command run. - The `input` argument is the List of lines for the - buffer, after applying any previous fixers. - - The callback must return the same values returned for - any fixer function. This allows fixer functions to be - chained recursively. - - When the command string returned for a fixer is an empty - string, the next command in the chain will still be run. - This allows commands to be skipped, like version checks - that are cached. An empty List will be passed to the - next callback in the chain for the `output`. - `read_buffer` An optional key for disabling reading the buffer. When set to `0`, ALE will not pipe the buffer's data @@ -734,10 +264,7 @@ are supported for running the commands. the buffer is not read when `read_temporary_file` is `1`. - This option defaults to `0` when `chain_with` is defined - as anything other than `v:null`, and defaults to `1` - otherwise. This is so earlier commands in a chain - do not receive the buffer's data by default. + This option defaults to `1`. *ale-fix-configuration* @@ -782,6 +309,9 @@ by default. |g:ale_fix_on_save| - Fix files when they are saved. +Fixers can be disabled on save with |g:ale_fix_on_save_ignore|. They will +still be run when you manually run |ALEFix|. + =============================================================================== 5. Language Server Protocol Support *ale-lsp* @@ -791,37 +321,44 @@ servers. LSP linters can be used in combination with any other linter, and will automatically connect to LSP servers when needed. ALE also supports `tsserver` for TypeScript, which uses a different but very similar protocol. -ALE supports the following LSP/tsserver features: - -1. Diagnostics/linting - Enabled via selecting linters as usual. -2. Completion -3. Go to definition - ------------------------------------------------------------------------------- 5.1 Completion *ale-completion* -ALE offers limited support for automatic completion of code while you type. +ALE offers support for automatic completion of code while you type. 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`. 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|. + *ale-deoplete-integration* + +ALE integrates with Deoplete for offering automatic completion data. ALE's +completion source for Deoplete is named `'ale'`, and should enabled +automatically if Deoplete is enabled and configured correctly. Deoplete +integration should not be combined with ALE's own implementation. + +ALE also offers its own completion implementation, which does not require any +other plugins. Suggestions will be made while you type after completion is +enabled. 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|. - *ale-completion-completopt-bug* +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. -ALE implements completion as you type by temporarily adjusting |completeopt| -before opening the omnicomplete menu with <C-x><C-o>. In some versions of Vim, -the value set for the option will not be respected. If you experience issues -with Vim automatically inserting text while you type, set the following option -in vimrc, and your issues should go away. > + *ale-completion-completeopt-bug* + +ALE Automatic completion implementation replaces |completeopt| before opening +the omnicomplete menu with <C-x><C-o>. In some versions of Vim, the value set +for the option will not be respected. If you experience issues with Vim +automatically inserting text while you type, set the following option in +vimrc, and your issues should go away. > set completeopt=menu,menuone,preview,noselect,noinsert < @@ -835,10 +372,29 @@ information returned by LSP servers. The following commands are supported: |ALEGoToDefinition| - Open the definition of the symbol under the cursor. |ALEGoToDefinitionInTab| - The same, but for opening the file in a new tab. +|ALEGoToDefinitionInSplit| - The same, but in a new split. +|ALEGoToDefinitionInVSplit| - The same, but in a new vertical split. +ALE will update Vim's |tagstack| automatically unless |g:ale_update_tagstack| is +set to `0`. ------------------------------------------------------------------------------- -5.3 Find References *ale-find-references* +5.3 Go To Type Definition *ale-go-to-type-definition* + +ALE supports jumping to the files and locations where symbols' types are +defined through any enabled LSP linters. The locations ALE will jump to depend +on the information returned by LSP servers. The following commands are +supported: + +|ALEGoToTypeDefinition| - Open the definition of the symbol's type under + the cursor. +|ALEGoToTypeDefinitionInTab| - The same, but for opening the file in a new tab. +|ALEGoToTypeDefinitionInSplit| - The same, but in a new split. +|ALEGoToTypeDefinitionInVSplit| - The same, but in a new vertical split. + + +------------------------------------------------------------------------------- +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 @@ -847,9 +403,11 @@ supported: |ALEFindReferences| - Find references for the word under the cursor. +Options: + `-relative` Show file paths in the results relative to the working dir ------------------------------------------------------------------------------- -5.4 Hovering *ale-hover* +5.5 Hovering *ale-hover* ALE supports "hover" information for printing brief information about symbols at the cursor taken from LSP linters. The following commands are supported: @@ -876,14 +434,19 @@ settings. For example: > set ttymouse=xterm < +Documentation for symbols at the cursor can be retrieved using the +|ALEDocumentation| command. This command is only available for `tsserver`. + ------------------------------------------------------------------------------- -5.5 Symbol Search *ale-symbol-search* +5.6 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. +Options: + `-relative` Show file paths in the results relative to the working dir =============================================================================== 6. Global Options *ale-options* @@ -1058,6 +621,16 @@ g:ale_cursor_detail *g:ale_cursor_detail* loaded for messages to be displayed. See |ale-lint-settings-on-startup|. +g:ale_disable_lsp *g:ale_disable_lsp* + *b:ale_disable_lsp* + + Type: |Number| + Default: `0` + + When this option is set to `1`, ALE ignores all linters powered by LSP. + Please see also |ale-lsp|. + + g:ale_echo_cursor *g:ale_echo_cursor* Type: |Number| @@ -1207,6 +780,43 @@ b:ale_fix_on_save *b:ale_fix_on_save* Fixing files can be disabled or enabled for individual buffers by setting `b:ale_fix_on_save` to `0` or `1`. + Some fixers can be excluded from being run automatically when you save files + with the |g:ale_fix_on_save_ignore| setting. + + +g:ale_fix_on_save_ignore *g:ale_fix_on_save_ignore* +b:ale_fix_on_save_ignore *b:ale_fix_on_save_ignore* + + Type: |Dictionary| or |List| + Default: `{}` + + Given a |Dictionary| mapping filetypes to |Lists| of fixers to ignore, or + just a |List| of fixers to ignore, exclude those fixers from being run + automatically when files are saved. + + You can disable some fixers in your ftplugin file: > + + " Disable fixers 'b' and 'c' when fixing on safe for this buffer. + let b:ale_fix_on_save_ignore = ['b', 'c'] + " Alternatively, define ignore lists for different filetypes. + let b:ale_fix_on_save_ignore = {'foo': ['b'], 'bar': ['c']} +< + You can disable some fixers globally per filetype like so: > + + let g:ale_fixers = {'foo': ['a', 'b'], 'bar': ['c', 'd']} + let g:ale_fix_on_save = 1 + " For filetype `foo.bar`, only fixers 'b' and 'd' will be run on save. + let g:ale_fix_on_save_ignore = {'foo': ['a'], 'bar': ['c']} + " Alternatively, disable these fixers on save for all filetypes. + let g:ale_fix_on_save_ignore = ['a', 'c'] +< + You can ignore fixers based on matching |Funcref| values too: > + + let g:AddBar = {buffer, lines -> lines + ['bar']} + let g:ale_fixers = {'foo': g:AddBar} + " The lambda fixer will be ignored, as it will be found in the ignore list. + let g:ale_fix_on_save_ignore = [g:AddBar] +< g:ale_history_enabled *g:ale_history_enabled* @@ -1431,7 +1041,7 @@ g:ale_linters *g:ale_linters* { \ 'csh': ['shell'], - \ 'elixir': ['credo', 'dialyxir', 'dogma', 'elixir-ls'], + \ 'elixir': ['credo', 'dialyxir', 'dogma'], \ 'go': ['gofmt', 'golint', 'go vet'], \ 'hack': ['hack'], \ 'help': [], @@ -1540,6 +1150,22 @@ b:ale_loclist_msg_format *b:ale_loclist_msg_format* The strings for configuring `%severity%` are also used for this option. +g:ale_lsp_root *g:ale_lsp_root* +b:ale_lsp_root *b:ale_lsp_root* + + Type: |Dictionary| or |String| + Default: {} + + This option is used to determine the project root for the LSP linter. If the + value is a |Dictionary|, it maps a linter to either a string containing the + project root or a |Funcref| to call to look up the root. The funcref is + provided the buffer number as its argument. + + The buffer-specific variable may additionally be a string containing the + project root itself. + + 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* @@ -1783,6 +1409,33 @@ g:ale_set_signs *g:ale_set_signs* To limit the number of signs ALE will set, see |g:ale_max_signs|. +g:ale_shell *g:ale_shell* + + Type: |String| + Default: not set + + Override the shell used by ALE for executing commands. ALE uses 'shell' by + default, but falls back in `/bin/sh` if the default shell looks like `fish` + or `pwsh`, which are not compatible with all of the commands run by ALE. The + shell specified with this option will be used even if it might not work in + all cases. + + For Windows, ALE uses `cmd` when this option isn't set. Setting this option + will apply shell escaping to the command string, even on Windows. + + NOTE: Consider setting |g:ale_shell_arguments| if this option is defined. + + +g:ale_shell_arguments *g:ale_shell_arguments* + + Type: |String| + Default: not set + + This option specifies the arguments to use for executing a command with a + custom shell, per |g:ale_shell|. If this option is not set, 'shellcmdflag' + will be used instead. + + g:ale_sign_column_always *g:ale_sign_column_always* Type: |Number| @@ -1848,6 +1501,14 @@ g:ale_sign_warning *g:ale_sign_warning* The sign for warnings in the sign gutter. +g:ale_update_tagstack *g:ale_update_tagstack* + *b:ale_update_tagstack* + Type: |Number| + Default: `1` + + This option can be set to disable updating Vim's |tagstack| automatically. + + g:ale_type_map *g:ale_type_map* *b:ale_type_map* Type: |Dictionary| @@ -2129,11 +1790,79 @@ ALEWarningSign *ALEWarningSign* The highlight for warning signs. See |g:ale_set_signs|. +=============================================================================== +7. Linter/Fixer Options *ale-integration-options* + +Linter and fixer options are documented below and in individual help files. + +Every option for programs can be set globally, or individually for each +buffer. For example, `b:ale_python_flake8_executable` will override any +values set for `g:ale_python_flake8_executable`. + + *ale-integrations-local-executables* + +Some tools will prefer to search for locally-installed executables, unless +configured otherwise. For example, the `eslint` linter will search for +various executable paths in `node_modules`. The `flake8` linter will search +for virtualenv directories. + +If you prefer to use global executables for those tools, set the relevant +`_use_global` and `_executable` options for those linters. > + + " Use the global executable with a special name for eslint. + let g:ale_javascript_eslint_executable = 'special-eslint' + let g:ale_javascript_eslint_use_global = 1 + + " Use the global executable with a special name for flake8. + let g:ale_python_flake8_executable = '/foo/bar/flake8' + let g:ale_python_flake8_use_global = 1 +< +|g:ale_use_global_executables| can be set to `1` in your vimrc file to make +ALE use global executables for all linters by default. + +The option |g:ale_virtualenv_dir_names| controls the local virtualenv paths +ALE will use to search for Python executables. + + ------------------------------------------------------------------------------- -6.2. Options for write-good *ale-write-good-options* +7.1. Options for alex *ale-alex-options* + +The options for `alex` are shared between all filetypes, so options can be +configured once. -The options for the write-good linter are global because it does not make -sense to have them specified on a per-language basis. +g:ale_alex_executable *g:ale_alex_executable* + *b:ale_alex_executable* + Type: |String| + Default: `'alex'` + + See |ale-integrations-local-executables| + + +g:ale_alex_use_global *g:ale_alex_use_global* + *b:ale_alex_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +------------------------------------------------------------------------------- +7.2. Options for languagetool *ale-languagetool-options* + +g:ale_languagetool_executable *g:ale_languagetool_executable* + *b:ale_languagetool_executable* + + Type: |String| + Default: `'languagetool'` + + The executable to run for languagetool. + + +------------------------------------------------------------------------------- +7.3. Options for write-good *ale-write-good-options* + +The options for `write-good` are shared between all filetypes, so options can +be configured once. g:ale_writegood_executable *g:ale_writegood_executable* *b:ale_writegood_executable* @@ -2159,44 +1888,412 @@ g:ale_writegood_use_global *g:ale_writegood_use_global* See |ale-integrations-local-executables| -=============================================================================== -7. Integration Documentation *ale-integrations* - -Linter and fixer options are documented in individual help files. See the -table of contents at |ale-contents|. +------------------------------------------------------------------------------- +7.4. Other Linter/Fixer Options *ale-other-integration-options* + +ALE supports a very wide variety of tools. Other linter or fixer options are +documented in additional help files. + + ada.....................................|ale-ada-options| + gcc...................................|ale-ada-gcc| + ansible.................................|ale-ansible-options| + ansible-lint..........................|ale-ansible-ansible-lint| + asciidoc................................|ale-asciidoc-options| + write-good............................|ale-asciidoc-write-good| + textlint..............................|ale-asciidoc-textlint| + asm.....................................|ale-asm-options| + gcc...................................|ale-asm-gcc| + awk.....................................|ale-awk-options| + gawk..................................|ale-awk-gawk| + bib.....................................|ale-bib-options| + bibclean..............................|ale-bib-bibclean| + c.......................................|ale-c-options| + clang.................................|ale-c-clang| + 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| + clojure.................................|ale-clojure-options| + clj-kondo.............................|ale-clojure-clj-kondo| + joker.................................|ale-clojure-joker| + cloudformation..........................|ale-cloudformation-options| + cfn-python-lint.......................|ale-cloudformation-cfn-python-lint| + cmake...................................|ale-cmake-options| + cmakelint.............................|ale-cmake-cmakelint| + cmake-format..........................|ale-cmake-cmakeformat| + cpp.....................................|ale-cpp-options| + clang.................................|ale-cpp-clang| + clangd................................|ale-cpp-clangd| + clangcheck............................|ale-cpp-clangcheck| + clang-format..........................|ale-cpp-clangformat| + clangtidy.............................|ale-cpp-clangtidy| + clazy.................................|ale-cpp-clazy| + cppcheck..............................|ale-cpp-cppcheck| + 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| + mcs...................................|ale-cs-mcs| + mcsc..................................|ale-cs-mcsc| + uncrustify............................|ale-cs-uncrustify| + css.....................................|ale-css-options| + fecs..................................|ale-css-fecs| + prettier..............................|ale-css-prettier| + stylelint.............................|ale-css-stylelint| + cuda....................................|ale-cuda-options| + nvcc..................................|ale-cuda-nvcc| + clang-format..........................|ale-cuda-clangformat| + 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| + credo.................................|ale-elixir-credo| + elm.....................................|ale-elm-options| + elm-format............................|ale-elm-elm-format| + elm-lsp...............................|ale-elm-elm-lsp| + elm-make..............................|ale-elm-elm-make| + erlang..................................|ale-erlang-options| + erlc..................................|ale-erlang-erlc| + syntaxerl.............................|ale-erlang-syntaxerl| + eruby...................................|ale-eruby-options| + ruumba................................|ale-eruby-ruumba| + fish....................................|ale-fish-options| + fortran.................................|ale-fortran-options| + gcc...................................|ale-fortran-gcc| + language_server.......................|ale-fortran-language-server| + fountain................................|ale-fountain-options| + fusionscript............................|ale-fuse-options| + fusion-lint...........................|ale-fuse-fusionlint| + git commit..............................|ale-gitcommit-options| + gitlint...............................|ale-gitcommit-gitlint| + glsl....................................|ale-glsl-options| + glslang...............................|ale-glsl-glslang| + glslls................................|ale-glsl-glslls| + go......................................|ale-go-options| + bingo.................................|ale-go-bingo| + gobuild...............................|ale-go-gobuild| + gofmt.................................|ale-go-gofmt| + golangci-lint.........................|ale-go-golangci-lint| + golangserver..........................|ale-go-golangserver| + golint................................|ale-go-golint| + gometalinter..........................|ale-go-gometalinter| + gopls.................................|ale-go-gopls| + govet.................................|ale-go-govet| + staticcheck...........................|ale-go-staticcheck| + graphql.................................|ale-graphql-options| + eslint................................|ale-graphql-eslint| + gqlint................................|ale-graphql-gqlint| + prettier..............................|ale-graphql-prettier| + hack....................................|ale-hack-options| + hack..................................|ale-hack-hack| + hackfmt...............................|ale-hack-hackfmt| + hhast.................................|ale-hack-hhast| + handlebars..............................|ale-handlebars-options| + ember-template-lint...................|ale-handlebars-embertemplatelint| + haskell.................................|ale-haskell-options| + brittany..............................|ale-haskell-brittany| + floskell..............................|ale-haskell-floskell| + ghc...................................|ale-haskell-ghc| + ghc-mod...............................|ale-haskell-ghc-mod| + cabal-ghc.............................|ale-haskell-cabal-ghc| + hdevtools.............................|ale-haskell-hdevtools| + hfmt..................................|ale-haskell-hfmt| + hlint.................................|ale-haskell-hlint| + stack-build...........................|ale-haskell-stack-build| + stack-ghc.............................|ale-haskell-stack-ghc| + stylish-haskell.......................|ale-haskell-stylish-haskell| + hie...................................|ale-haskell-hie| + hcl.....................................|ale-hcl-options| + terraform-fmt.........................|ale-hcl-terraform-fmt| + html....................................|ale-html-options| + fecs..................................|ale-html-fecs| + htmlhint..............................|ale-html-htmlhint| + tidy..................................|ale-html-tidy| + prettier..............................|ale-html-prettier| + stylelint.............................|ale-html-stylelint| + write-good............................|ale-html-write-good| + idris...................................|ale-idris-options| + idris.................................|ale-idris-idris| + ispc....................................|ale-ispc-options| + ispc..................................|ale-ispc-ispc| + java....................................|ale-java-options| + checkstyle............................|ale-java-checkstyle| + javac.................................|ale-java-javac| + google-java-format....................|ale-java-google-java-format| + pmd...................................|ale-java-pmd| + javalsp...............................|ale-java-javalsp| + eclipselsp............................|ale-java-eclipselsp| + uncrustify............................|ale-java-uncrustify| + javascript..............................|ale-javascript-options| + eslint................................|ale-javascript-eslint| + fecs..................................|ale-javascript-fecs| + flow..................................|ale-javascript-flow| + importjs..............................|ale-javascript-importjs| + jscs..................................|ale-javascript-jscs| + jshint................................|ale-javascript-jshint| + prettier..............................|ale-javascript-prettier| + prettier-eslint.......................|ale-javascript-prettier-eslint| + prettier-standard.....................|ale-javascript-prettier-standard| + standard..............................|ale-javascript-standard| + xo....................................|ale-javascript-xo| + json....................................|ale-json-options| + fixjson...............................|ale-json-fixjson| + jsonlint..............................|ale-json-jsonlint| + jq....................................|ale-json-jq| + prettier..............................|ale-json-prettier| + julia...................................|ale-julia-options| + languageserver........................|ale-julia-languageserver| + kotlin..................................|ale-kotlin-options| + kotlinc...............................|ale-kotlin-kotlinc| + ktlint................................|ale-kotlin-ktlint| + languageserver........................|ale-kotlin-languageserver| + latex...................................|ale-latex-options| + write-good............................|ale-latex-write-good| + textlint..............................|ale-latex-textlint| + less....................................|ale-less-options| + lessc.................................|ale-less-lessc| + prettier..............................|ale-less-prettier| + stylelint.............................|ale-less-stylelint| + llvm....................................|ale-llvm-options| + llc...................................|ale-llvm-llc| + lua.....................................|ale-lua-options| + luac..................................|ale-lua-luac| + luacheck..............................|ale-lua-luacheck| + markdown................................|ale-markdown-options| + mdl...................................|ale-markdown-mdl| + prettier..............................|ale-markdown-prettier| + remark-lint...........................|ale-markdown-remark-lint| + textlint..............................|ale-markdown-textlint| + write-good............................|ale-markdown-write-good| + mercury.................................|ale-mercury-options| + mmc...................................|ale-mercury-mmc| + nasm....................................|ale-nasm-options| + nasm..................................|ale-nasm-nasm| + nroff...................................|ale-nroff-options| + write-good............................|ale-nroff-write-good| + objc....................................|ale-objc-options| + clang.................................|ale-objc-clang| + clangd................................|ale-objc-clangd| + uncrustify............................|ale-objc-uncrustify| + ccls..................................|ale-objc-ccls| + objcpp..................................|ale-objcpp-options| + clang.................................|ale-objcpp-clang| + clangd................................|ale-objcpp-clangd| + uncrustify............................|ale-objcpp-uncrustify| + ocaml...................................|ale-ocaml-options| + merlin................................|ale-ocaml-merlin| + ols...................................|ale-ocaml-ols| + ocamlformat...........................|ale-ocaml-ocamlformat| + ocp-indent............................|ale-ocaml-ocp-indent| + pawn....................................|ale-pawn-options| + uncrustify............................|ale-pawn-uncrustify| + perl....................................|ale-perl-options| + 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| + phpcbf................................|ale-php-phpcbf| + phpcs.................................|ale-php-phpcs| + phpmd.................................|ale-php-phpmd| + phpstan...............................|ale-php-phpstan| + psalm.................................|ale-php-psalm| + php-cs-fixer..........................|ale-php-php-cs-fixer| + php...................................|ale-php-php| + po......................................|ale-po-options| + write-good............................|ale-po-write-good| + pod.....................................|ale-pod-options| + write-good............................|ale-pod-write-good| + pony....................................|ale-pony-options| + ponyc.................................|ale-pony-ponyc| + powershell............................|ale-powershell-options| + powershell..........................|ale-powershell-powershell| + psscriptanalyzer....................|ale-powershell-psscriptanalyzer| + prolog..................................|ale-prolog-options| + swipl.................................|ale-prolog-swipl| + proto...................................|ale-proto-options| + protoc-gen-lint.......................|ale-proto-protoc-gen-lint| + pug.....................................|ale-pug-options| + puglint...............................|ale-pug-puglint| + puppet..................................|ale-puppet-options| + puppet................................|ale-puppet-puppet| + puppetlint............................|ale-puppet-puppetlint| + puppet-languageserver.................|ale-puppet-languageserver| + pyrex (cython)..........................|ale-pyrex-options| + cython................................|ale-pyrex-cython| + python..................................|ale-python-options| + autopep8..............................|ale-python-autopep8| + bandit................................|ale-python-bandit| + black.................................|ale-python-black| + flake8................................|ale-python-flake8| + isort.................................|ale-python-isort| + mypy..................................|ale-python-mypy| + prospector............................|ale-python-prospector| + pycodestyle...........................|ale-python-pycodestyle| + pydocstyle............................|ale-python-pydocstyle| + pyflakes..............................|ale-python-pyflakes| + pylama................................|ale-python-pylama| + pylint................................|ale-python-pylint| + pyls..................................|ale-python-pyls| + pyre..................................|ale-python-pyre| + vulture...............................|ale-python-vulture| + yapf..................................|ale-python-yapf| + qml.....................................|ale-qml-options| + qmlfmt................................|ale-qml-qmlfmt| + r.......................................|ale-r-options| + lintr.................................|ale-r-lintr| + styler................................|ale-r-styler| + reasonml................................|ale-reasonml-options| + merlin................................|ale-reasonml-merlin| + ols...................................|ale-reasonml-ols| + refmt.................................|ale-reasonml-refmt| + restructuredtext........................|ale-restructuredtext-options| + textlint..............................|ale-restructuredtext-textlint| + write-good............................|ale-restructuredtext-write-good| + ruby....................................|ale-ruby-options| + brakeman..............................|ale-ruby-brakeman| + rails_best_practices..................|ale-ruby-rails_best_practices| + reek..................................|ale-ruby-reek| + rubocop...............................|ale-ruby-rubocop| + ruby..................................|ale-ruby-ruby| + rufo..................................|ale-ruby-rufo| + solargraph............................|ale-ruby-solargraph| + standardrb............................|ale-ruby-standardrb| + rust....................................|ale-rust-options| + cargo.................................|ale-rust-cargo| + rls...................................|ale-rust-rls| + rustc.................................|ale-rust-rustc| + rustfmt...............................|ale-rust-rustfmt| + sass....................................|ale-sass-options| + sasslint..............................|ale-sass-sasslint| + stylelint.............................|ale-sass-stylelint| + scala...................................|ale-scala-options| + sbtserver.............................|ale-scala-sbtserver| + scalafmt..............................|ale-scala-scalafmt| + scalastyle............................|ale-scala-scalastyle| + scss....................................|ale-scss-options| + prettier..............................|ale-scss-prettier| + sasslint..............................|ale-scss-sasslint| + stylelint.............................|ale-scss-stylelint| + sh......................................|ale-sh-options| + sh-language-server....................|ale-sh-language-server| + shell.................................|ale-sh-shell| + shellcheck............................|ale-sh-shellcheck| + shfmt.................................|ale-sh-shfmt| + sml.....................................|ale-sml-options| + smlnj.................................|ale-sml-smlnj| + solidity................................|ale-solidity-options| + solhint...............................|ale-solidity-solhint| + solium................................|ale-solidity-solium| + spec....................................|ale-spec-options| + rpmlint...............................|ale-spec-rpmlint| + sql.....................................|ale-sql-options| + sqlfmt................................|ale-sql-sqlfmt| + stylus..................................|ale-stylus-options| + stylelint.............................|ale-stylus-stylelint| + sugarss.................................|ale-sugarss-options| + stylelint.............................|ale-sugarss-stylelint| + swift...................................|ale-swift-options| + sourcekitlsp..........................|ale-swift-sourcekitlsp| + 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| + lacheck...............................|ale-tex-lacheck| + latexindent...........................|ale-tex-latexindent| + texinfo.................................|ale-texinfo-options| + write-good............................|ale-texinfo-write-good| + text....................................|ale-text-options| + textlint..............................|ale-text-textlint| + write-good............................|ale-text-write-good| + thrift..................................|ale-thrift-options| + thrift................................|ale-thrift-thrift| + typescript..............................|ale-typescript-options| + eslint................................|ale-typescript-eslint| + prettier..............................|ale-typescript-prettier| + tslint................................|ale-typescript-tslint| + tsserver..............................|ale-typescript-tsserver| + vala....................................|ale-vala-options| + uncrustify............................|ale-vala-uncrustify| + verilog/systemverilog...................|ale-verilog-options| + iverilog..............................|ale-verilog-iverilog| + verilator.............................|ale-verilog-verilator| + vlog..................................|ale-verilog-vlog| + xvlog.................................|ale-verilog-xvlog| + vhdl....................................|ale-vhdl-options| + ghdl..................................|ale-vhdl-ghdl| + vcom..................................|ale-vhdl-vcom| + xvhdl.................................|ale-vhdl-xvhdl| + vim.....................................|ale-vim-options| + vint..................................|ale-vim-vint| + vim help................................|ale-vim-help-options| + write-good............................|ale-vim-help-write-good| + vue.....................................|ale-vue-options| + prettier..............................|ale-vue-prettier| + vls...................................|ale-vue-vls| + xhtml...................................|ale-xhtml-options| + write-good............................|ale-xhtml-write-good| + xml.....................................|ale-xml-options| + xmllint...............................|ale-xml-xmllint| + yaml....................................|ale-yaml-options| + prettier..............................|ale-yaml-prettier| + swaglint..............................|ale-yaml-swaglint| + yamllint..............................|ale-yaml-yamllint| + yang....................................|ale-yang-options| + yang-lsp..............................|ale-yang-lsp| -Every option for programs can be set globally, or individually for each -buffer. For example, `b:ale_python_flake8_executable` will override any -values set for `g:ale_python_flake8_executable`. - *ale-integrations-local-executables* +=============================================================================== +8. Commands/Keybinds *ale-commands* -Some tools will prefer to search for locally-installed executables, unless -configured otherwise. For example, the `eslint` linter will search for -various executable paths in `node_modules`. The `flake8` linter will search -for virtualenv directories. +ALEComplete *ALEComplete* -If you prefer to use global executables for those tools, set the relevant -`_use_global` and `_executable` options for those linters. > + Manually trigger LSP autocomplete and show the menu. Works only when called + from insert mode. > - " Use the global executable with a special name for eslint. - let g:ale_javascript_eslint_executable = 'special-eslint' - let g:ale_javascript_eslint_use_global = 1 + inoremap <silent> <C-Space> <C-\><C-O>:AleComplete<CR> +< + A plug mapping `<Plug>(ale_complete)` is defined for this command. > - " Use the global executable with a special name for flake8. - let g:ale_python_flake8_executable = '/foo/bar/flake8' - let g:ale_python_flake8_use_global = 1 + imap <C-Space> <Plug>(ale_complete) < +ALEDocumentation *ALEDocumentation* -|g:ale_use_global_executables| can be set to `1` in your vimrc file to make -ALE use global executables for all linters by default. + Similar to the |ALEHover| command, retrieve documentation information for + the symbol at the cursor. Documentation data will always be shown in a + preview window, no matter how small the documentation content is. -The option |g:ale_virtualenv_dir_names| controls the local virtualenv paths -ALE will use to search for Python executables. + NOTE: This command is only available for `tsserver`. + A plug mapping `<Plug>(ale_documentation)` is defined for this command. -=============================================================================== -8. Commands/Keybinds *ale-commands* ALEFindReferences *ALEFindReferences* @@ -2247,6 +2344,61 @@ ALEGoToDefinitionInTab *ALEGoToDefinitionInTab* command. +ALEGoToDefinitionInSplit *ALEGoToDefinitionInSplit* + + The same as |ALEGoToDefinition|, but opens results in a new split. + + A plug mapping `<Plug>(ale_go_to_definition_in_split)` is defined for this + command. + + +ALEGoToDefinitionInVSplit *ALEGoToDefinitionInVSplit* + + The same as |ALEGoToDefinition|, but opens results in a new vertical split. + + A plug mapping `<Plug>(ale_go_to_definition_in_vsplit)` is defined for this + command. + + +ALEGoToTypeDefinition *ALEGoToTypeDefinition* + + This works similar to |ALEGoToDefinition| but instead jumps to the + definition of a type of a symbol under the cursor. ALE will jump to a + definition if an LSP server provides a location to jump to. Otherwise, ALE + will do nothing. + + 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. + + +ALEGoToTypeDefinitionInTab *ALEGoToTypeDefinitionInTab* + + The same as |ALEGoToTypeDefinition|, but opens results in a new tab. + + A plug mapping `<Plug>(ale_go_to_type_definition_in_tab)` is defined for + this command. + + +ALEGoToTypeDefinitionInSplit *ALEGoToTypeDefinitionInSplit* + + The same as |ALEGoToTypeDefinition|, but opens results in a new split. + + A plug mapping `<Plug>(ale_go_to_type_definition_in_split)` is defined for + this command. + + +ALEGoToTypeDefinitionInVSplit *ALEGoToTypeDefinitionInVSplit* + + The same as |ALEGoToTypeDefinition|, but opens results in a new vertical + split. + + A plug mapping `<Plug>(ale_go_to_type_definition_in_vsplit)` is defined for + this command. + + ALEHover *ALEHover* Print brief information about the symbol under the cursor, taken from any @@ -2295,14 +2447,36 @@ ALELast *ALELast* `ALEPreviousWrap` and `ALENextWrap` will wrap around the file to find the last or first warning or error in the file, respectively. + `ALEPrevious` and `ALENext` take optional flags arguments to custom their + behaviour : + `-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 + several are provided the priority is the following: error > warning > info. + `-style` and `-nostyle` allow you to jump respectively to style error or + warning and to not style error or warning. They also are mutually + exclusive and nostyle has priority over style. + + Flags can be combined to create create custom jumping. Thus you can use + ":ALENext -wrap -error -nosyle" to jump to the next error which is not a + style error while going back to the begining of the file if needed. + `ALEFirst` goes to the first error or warning in the buffer, while `ALELast` goes to the last one. The following |<Plug>| mappings are defined for the commands: > <Plug>(ale_previous) - ALEPrevious <Plug>(ale_previous_wrap) - ALEPreviousWrap + <Plug>(ale_previous_error) - ALEPrevious -error + <Plug>(ale_previous_wrap_error) - ALEPrevious -wrap -error + <Plug>(ale_previous_warning) - ALEPrevious -warning + <Plug>(ale_previous_wrap_warning) - ALEPrevious -wrap -warning <Plug>(ale_next) - ALENext <Plug>(ale_next_wrap) - ALENextWrap + <Plug>(ale_next_error) - ALENext -error + <Plug>(ale_next_wrap_error) - ALENext -wrap -error + <Plug>(ale_next_warning) - ALENext -warning + <Plug>(ale_next_wrap_warning) - ALENext -wrap -warning <Plug>(ale_first) - ALEFirst <Plug>(ale_last) - ALELast < @@ -2434,6 +2608,14 @@ ale#Env(variable_name, value) *ale#Env()* 'set VAR="some value" && command' # On Windows +ale#Has(feature) *ale#Has()* + + Return `1` if ALE supports a given feature, like |has()| for Vim features. + + ALE versions can be checked with version strings in the format + `ale#Has('ale-x.y.z')`, such as `ale#Has('ale-2.4.0')`. + + ale#Pad(string) *ale#Pad()* Given a string or any |empty()| value, return either the string prefixed @@ -2462,26 +2644,105 @@ ale#Queue(delay, [linting_flag, buffer_number]) *ale#Queue()* is broken, or when developing ALE itself. -ale#engine#CreateDirectory(buffer) *ale#engine#CreateDirectory()* +ale#command#CreateDirectory(buffer) *ale#command#CreateDirectory()* Create a new temporary directory with a unique name, and manage that - directory with |ale#engine#ManageDirectory()|, so it will be removed as soon + directory with |ale#command#ManageDirectory()|, so it will be removed as soon as possible. It is advised to only call this function from a callback function for returning a linter command to run. -ale#engine#CreateFile(buffer) *ale#engine#CreateFile()* +ale#command#CreateFile(buffer) *ale#command#CreateFile()* Create a new temporary file with a unique name, and manage that file with - |ale#engine#ManageFile()|, so it will be removed as soon as possible. + |ale#command#ManageFile()|, so it will be removed as soon as possible. It is advised to only call this function from a callback function for returning a linter command to run. -ale#engine#EscapeCommandPart(command_part) *ale#engine#EscapeCommandPart()* +ale#command#Run(buffer, command, callback, [options]) *ale#command#Run()* + + Start running a job in the background, and pass the results to the given + callback later. + + This function can be used for computing the results of ALE linter or fixer + functions asynchronously with jobs. `buffer` must match the buffer being + linted or fixed, `command` must be a |String| for a shell command to + execute, `callback` must be defined as a |Funcref| to call later with the + results, and an optional |Dictionary| of `options` can be provided. + + The `callback` will receive the arguments `(buffer, output, metadata)`, + where the `buffer` will match the buffer given to the function, the `output` + will be a `List` of lines of output from the job that was run, and the + `metadata` will be a |Dictionary| with additional information about the job + that was run, including: + + `exit_code` - A |Number| with the exit code for the program that was run. + + The result of this function is either a special |Dictionary| ALE will use + for waiting for the command to finish, or `0` if the job is not started. The + The return value of the `callback` will be used as the eventual result for + whatever value is being given to ALE. For example: > + + function! s:GetCommand(buffer, output, meta) abort + " Do something with a:output here, from the foo command. + + " This is used as the command to run for linting. + return 'final command' + endfunction + + " ... + + 'command': {b -> ale#command#Run(b, 'foo', function('s:GetCommand'))} +< + The result of a callback can also be the result of another call to this + function, so that several commands can be arbitrarily chained together. For + example: > + + function! s:GetAnotherCommand(buffer, output, meta) abort + " We can finally return this command. + return 'last command' + endfunction + + function! s:GetCommand(buffer, output, meta) abort + " We can return another deferred result. + return ale#command#Run( + \ a:buffer, + \ 'second command', + \ function('s:GetAnotherCommand') + \) + endfunction + + " ... + + 'command': {b -> ale#command#Run(b, 'foo', function('s:GetCommand'))} +< + + The following `options` can be provided. + + `output_stream` - Either `'stdout'`, `'stderr'`, `'both'`, or `'none`' for + selecting which output streams to read lines from. + + 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. + + `read_buffer` - If set to `1`, the buffer will be piped into the + command. + + 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. + + +ale#command#EscapeCommandPart(command_part) *ale#command#EscapeCommandPart()* Given a |String|, return a |String| with all `%` characters replaced with `%%` instead. This function can be used to escape strings which are @@ -2490,27 +2751,22 @@ ale#engine#EscapeCommandPart(command_part) *ale#engine#EscapeCommandPart()* specially. -ale#engine#GetLoclist(buffer) *ale#engine#GetLoclist()* +ale#command#ManageDirectory(buffer, directory) *ale#command#ManageDirectory()* - Given a buffer number, this function will return the list of problems - reported by ALE for a given buffer in the format accepted by |setqflist()|. - - A reference to the buffer's list of problems will be returned. The list must - be copied before applying |map()| or |filter()|. - - -ale#engine#IsCheckingBuffer(buffer) *ale#engine#IsCheckingBuffer()* - - Given a buffer number, returns `1` when ALE is busy checking that buffer. + Like |ale#command#ManageFile()|, but directories and all of their contents + will be deleted, akin to `rm -rf directory`, which could lead to loss of + data if mistakes are made. This command will also delete any temporary + filenames given to it. - This function can be used for status lines, tab names, etc. + It is advised to use |ale#command#ManageFile()| instead for deleting single + files. -ale#engine#ManageFile(buffer, filename) *ale#engine#ManageFile()* +ale#command#ManageFile(buffer, filename) *ale#command#ManageFile()* - Given a buffer number for a buffer currently running some linting tasks - and a filename, register a filename with ALE for automatic deletion after - linting is complete, or when Vim exits. + Given a buffer number for a buffer currently running some linting or fixing + tasks and a filename, register a filename with ALE for automatic deletion + after linting or fixing is complete, or when Vim exits. If Vim exits suddenly, ALE will try its best to remove temporary files, but ALE cannot guarantee with absolute certainty that the files will be removed. @@ -2521,18 +2777,23 @@ ale#engine#ManageFile(buffer, filename) *ale#engine#ManageFile()* files and symlinks given to this function. This is to prevent entire directories from being accidentally deleted, say in cases of writing `dir . '/' . filename` where `filename` is actually `''`, etc. ALE instead - manages directories separetly with the |ale#engine#ManageDirectory| function. + manages directories separately with the |ale#command#ManageDirectory| function. -ale#engine#ManageDirectory(buffer, directory) *ale#engine#ManageDirectory()* +ale#engine#GetLoclist(buffer) *ale#engine#GetLoclist()* - Like |ale#engine#ManageFile()|, but directories and all of their contents - will be deleted, akin to `rm -rf directory`, which could lead to loss of - data if mistakes are made. This command will also delete any temporary - filenames given to it. + Given a buffer number, this function will return the list of problems + reported by ALE for a given buffer in the format accepted by |setqflist()|. - It is advised to use |ale#engine#ManageFile()| instead for deleting single - files. + A reference to the buffer's list of problems will be returned. The list must + be copied before applying |map()| or |filter()|. + + +ale#engine#IsCheckingBuffer(buffer) *ale#engine#IsCheckingBuffer()* + + Given a buffer number, returns `1` when ALE is busy checking that buffer. + + This function can be used for status lines, tab names, etc. ale#fix#registry#Add(name, func, filetypes, desc, [aliases]) @@ -2624,7 +2885,7 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* and have been checked at least once. Temporary files in directories used for Vim - temporary files with `tempname()` will be asssumed + temporary files with `tempname()` will be assumed to be the buffer being checked, unless the `bufnr` key is also set with a valid number for some other buffer. @@ -2647,74 +2908,30 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* Human-readable |String| error code. `executable` A |String| naming the executable itself which - will be run. This value will be used to check if the - program requested is installed or not. + will be run, or a |Funcref| for a function to call + for computing the executable, accepting a buffer + number. + + The result can be computed with |ale#command#Run()|. - Either this or the `executable_callback` argument - must be provided. + This value will be used to check if the program + requested is installed or not. - `executable_callback ` A |String| or |Funcref| for a callback function - accepting a buffer number. A |String| should be - returned for the executable to check. This can be - used in place of `executable` when more complicated - processing is needed. + If an `executable` is not defined, the command will + be run without checking if a program is executable + first. Defining an executable path is recommended to + avoid starting too many processes. + + `command` A |String| for a command to run asynchronously, or a + |Funcref| for a function to call for computing the + command, accepting a buffer number. + + The result can be computed with |ale#command#Run()|. - `command` A |String| for an executable to run asynchronously. This command will be fed the lines from the buffer to check, and will produce the lines of output given to the `callback`. - `command_callback` A |String| or |Funcref| for a callback function - accepting a buffer number. A |String| should be - returned for a command to run. This can be used in - place of `command` when more complicated processing - is needed. - - If an empty string is returned from the callback, - no jobs for linting will be run for that linter. - This can be used for skipping a linter call, - say if no configuration file was found. - - *ale-command-chain* - `command_chain` A |List| of |Dictionary| items defining a series - of commands to be run. At least one |Dictionary| - should be provided. Each Dictionary must contain the - key `callback`, defining a |String| or |Funcref| for - a function returning a |String| for a command to run. - - The callback functions for each command after the - first command in in the chain should accept two - arguments `(buffer, output)`, a buffer number and a - |List| of lines of output from the previous command - in the chain. - - The first callback function in a chain accepts only - a `(buffer)` argument, as there are no previous - commands to run which return `output`. - - If an empty string is returned for a command in a - chain, that command in the chain will be skipped, - and the next function in the chain will be called - immediately instead. If the last command in a chain - returns an empty string, then no linting will be - performed. - - Commands in the chain will all use the - `output_stream` value provided in the root - |Dictionary|. Each command in the chain can also - provide an `output_stream` key to override this value. - See the `output_stream` description for more - information. - - Commands in the chain all behave as if `read_buffer` - is set to `0` by default, except for the last command - in the chain, which uses the value set for - `read_buffer` in the root |Dictionary|. Each command - in the chain can also provide a `read_buffer` key - to override these values. - See the `read_buffer` description for more - information. - `output_stream` A |String| for the output stream the lines of output should be read from for the command which is run. The accepted values are `'stdout'`, `'stderr'`, and @@ -2760,21 +2977,20 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* linter will be defined as an LSP linter which keeps a process for a language server running, and communicates with it directly via a |channel|. - `executable` or `executable_callback` must be set, - and `command` or `command_callback` must be set. + `executable` and `command` must be set. When this argument is set to `'socket'`, then the linter will be defined as an LSP linter via a TCP - socket connection. `address_callback` must be set - with a callback returning an address to connect to. + socket connection. `address` must be set. + ALE will not start a server automatically. - When this argument is not empty - `project_root_callback` must be defined. + When this argument is not empty `project_root` must + be defined. - `language` or `language_callback` can be defined to - describe the language for a file. The filetype will - be used as the language by default. + `language` can be defined to describe the language + for a file. The filetype will be used as the language + by default. LSP linters handle diagnostics automatically, so the `callback` argument must not be defined. @@ -2782,45 +2998,41 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* An optional `completion_filter` callback may be defined for filtering completion results. - An optional `initialization_options` or - `initialization_options_callback` may be defined to - pass initialization options to the LSP. + `initialization_options` 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. + `lsp_config` 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. + `address` A |String| representing an address to connect to, + or a |Funcref| accepting a buffer number and + returning the |String|. + + The result can be computed with |ale#command#Run()|. This argument must only be set if the `lsp` argument is set to `'socket'`. - `project_root_callback` A |String| or |Funcref| for a callback function - accepting a buffer number. A |String| should be - returned representing the path to the project for the - file being checked with the language server. If an - empty string is returned, the file will not be + `project_root` A |String| representing a path to the project for + the file being checked with the language server, or + a |Funcref| accepting a buffer number and returning + the |String|. + + If an empty string is returned, the file will not be checked at all. This argument must only be set if the `lsp` argument is also set to a non-empty string. `language` A |String| representing the name of the language - being checked. This string will be sent to the LSP to - tell it what type of language is being checked. - - If this or `language_callback` isn't set, the - language will default to the value of the filetype - given to |ale#linter#Define|. - - `language_callback` A |String| or |Funcref| for a callback function - accepting a buffer number. A |String| should be - returned representing the name of the language being - checked. + being checked, or a |Funcref| accepting a buffer + number and returning the |String|. This string will + be sent to the LSP to tell it what type of language + is being checked. - This option can be used instead of `language` if a - linter can check multiple languages. + If a language isn't provided, the language will + default to the value of the filetype given to + |ale#linter#Define|. `completion_filter` A |String| or |Funcref| for a callback function accepting a buffer number and a completion item. @@ -2838,38 +3050,24 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* setting can make it easier to guess the linter name by offering a few alternatives. - `initialization_options` A |Dictionary| of initialization options for LSPs. + `initialization_options` A |Dictionary| of initialization options for LSPs, + or a |Funcref| for a callback function accepting + a buffer number and returning the |Dictionary|. + This will be fed (as JSON) to the LSP in the initialize command. - `initialization_options_callback` - A |String| or |Funcref| for a callback function - accepting a buffer number. A |Dictionary| should be - returned for initialization options to pass the LSP. - This can be used in place of `initialization_options` - when more complicated processing is needed. + `lsp_config` A |Dictionary| for configuring a language server, + or a |Funcref| for a callback function accepting + a buffer number and returning the |Dictionary|. - `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. - `command_chain` is recommended where any system calls need to be made to - retrieve some kind of information before running the final command. - If temporary files or directories are created for commands run with - `command_callback` or `command_chain`, then these tempoary files or - directories can be managed by ALE, for automatic deletion. - See |ale#engine#ManageFile()| and |ale#engine#ManageDirectory| for more - information. + `command`, then these temporary files or directories can be managed by ALE, + for automatic deletion. See |ale#command#ManageFile()| and + |ale#command#ManageDirectory| for more information. *ale-command-format-strings* @@ -2887,16 +3085,16 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* strings will reference the one temporary file. The temporary file will be created inside a temporary directory, and the entire temporary directory will be automatically deleted, following the behaviour of - |ale#engine#ManageDirectory|. This option can be used for some linters which + |ale#command#ManageDirectory|. This option can be used for some linters which do not support reading from stdin. For example: > 'command': 'ghc -fno-code -v0 %t', < Any substring `%e` will be replaced with the escaped executable supplied - with `executable` or `executable_callback`. This provides a convenient way - to define a command string which needs to include a dynamic executable name, - but which is otherwise static. + with `executable`. This provides a convenient way to define a command string + which needs to include a dynamic executable name, but which is otherwise + static. For example: > 'command': '%e --some-argument', @@ -2907,7 +3105,7 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* 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#engine#EscapeCommandPart()| function can + behavior is not desired, the |ale#command#EscapeCommandPart()| function can be used to replace those characters to avoid formatting issues. *ale-linter-loading-behavior* @@ -2993,6 +3191,21 @@ ale#statusline#Count(buffer) *ale#statusline#Count()* `total` -> The total number of problems. +ale#statusline#FirstProblem(buffer, type) *ale#statusline#FirstProblem()* + + Returns a copy of the first entry in the `loclist` that matches the supplied + buffer number and problem type. If there is no such enty, an empty dictionary + is returned. + Problem type should be one of the strings listed below: + + `error` -> Returns the first `loclist` item with type `E` and + `sub_type != 'style'` + `warning` -> First item with type `W` and `sub_type != 'style'` + `info` -> First item with type `I` + `style_error` -> First item with type `E` and `sub_type == 'style'` + `style_warning` -> First item with type `W` and `sub_type == 'style'` + + b:ale_linted *b:ale_linted* `b:ale_linted` is set to the number of times a buffer has been checked by |