@@ -16,8 +16,18 @@ back to a filesystem.
1616
1717In other words, this plugin allows you to lint while you type.
1818
19- In addition to linting support, ALE offers some support for fixing code with
20- formatting tools, and some Language Server Protocol and ` tsserver ` features.
19+ ALE offers support for fixing code with command line tools in a non-blocking
20+ manner with the ` :ALEFix ` feature, supporting tools in many languages, like
21+ ` prettier ` , ` eslint ` , ` autopep8 ` , and more.
22+
23+ ALE acts as a "language client" to support a variety of Language Server Protocol
24+ features, including:
25+
26+ * Diagnostics (via Language Server Protocol linters)
27+ * Go To Definition (` :ALEGoToDefinition ` )
28+ * Completion (` let g:ale_completion_enabled = 1 ` )
29+ * Finding references (` :ALEFindReferences ` )
30+ * Hover information (` :ALEHover ` )
2131
2232## Table of Contents
2333
@@ -27,6 +37,8 @@ formatting tools, and some Language Server Protocol and `tsserver` features.
2737 2 . [ Fixing] ( #usage-fixing )
2838 3 . [ Completion] ( #usage-completion )
2939 4 . [ Go To Definition] ( #usage-go-to-definition )
40+ 5 . [ Find References] ( #usage-find-references )
41+ 6 . [ Hovering] ( #usage-hover )
30423 . [ Installation] ( #installation )
3143 1 . [ Installation with Vim package management] ( #standard-installation )
3244 2 . [ Installation with Pathogen] ( #installation-with-pathogen )
@@ -90,6 +102,7 @@ formatting.
90102| CoffeeScript | [ coffee] ( http://coffeescript.org/ ) , [ coffeelint] ( https://www.npmjs.com/package/coffeelint ) |
91103| Crystal | [ crystal] ( https://crystal-lang.org/ ) !! |
92104| CSS | [ csslint] ( http://csslint.net/ ) , [ prettier] ( https://github.com/prettier/prettier ) , [ stylelint] ( https://github.com/stylelint/stylelint ) |
105+ | Cucumber | [ cucumber] ( https://cucumber.io/ ) |
93106| Cython (pyrex filetype) | [ cython] ( http://cython.org/ ) |
94107| D | [ dmd] ( https://dlang.org/dmd-linux.html ) |
95108| Dafny | [ dafny] ( https://rise4fun.com/Dafny ) !! |
@@ -112,8 +125,8 @@ formatting.
112125| Haskell | [ brittany] ( https://github.com/lspitzner/brittany ) , [ ghc] ( https://www.haskell.org/ghc/ ) , [ stack-ghc] ( https://haskellstack.org/ ) , [ stack-build] ( https://haskellstack.org/ ) !!, [ ghc-mod] ( https://github.com/DanielG/ghc-mod ) , [ stack-ghc-mod] ( https://github.com/DanielG/ghc-mod ) , [ hlint] ( https://hackage.haskell.org/package/hlint ) , [ hdevtools] ( https://hackage.haskell.org/package/hdevtools ) , [ hfmt] ( https://github.com/danstiner/hfmt ) |
113126| HTML | [ alex] ( https://github.com/wooorm/alex ) !!, [ HTMLHint] ( http://htmlhint.com/ ) , [ proselint] ( http://proselint.com/ ) , [ tidy] ( http://www.html-tidy.org/ ) , [ write-good] ( https://github.com/btford/write-good ) |
114127| Idris | [ idris] ( http://www.idris-lang.org/ ) |
115- | Java | [ checkstyle] ( http://checkstyle.sourceforge.net ) , [ javac] ( http://www.oracle.com/technetwork/java/javase/downloads/index.html ) , [ google-java-format] ( https://github.com/google/google-java-format ) |
116- | JavaScript | [ eslint] ( http://eslint.org/ ) , [ flow] ( https://flowtype.org/ ) , [ jscs] ( http://jscs.info/ ) , [ jshint] ( http://jshint.com/ ) , [ prettier] ( https://github.com/prettier/prettier ) , [ prettier-eslint] ( https://github.com/prettier/prettier-eslint ) , [ prettier-standard] ( https://github.com/sheerun/prettier-standard ) , [ standard] ( http://standardjs.com/ ) , [ xo] ( https://github.com/sindresorhus/xo )
128+ | Java | [ checkstyle] ( http://checkstyle.sourceforge.net ) , [ javac] ( http://www.oracle.com/technetwork/java/javase/downloads/index.html ) , [ google-java-format] ( https://github.com/google/google-java-format ) , [ PMD ] ( https://pmd.github.io/ ) |
129+ | JavaScript | [ eslint] ( http://eslint.org/ ) , [ flow] ( https://flowtype.org/ ) , [ jscs] ( http://jscs.info/ ) , [ jshint] ( http://jshint.com/ ) , [ prettier] ( https://github.com/prettier/prettier ) , [ prettier-eslint] ( https://github.com/prettier/prettier-eslint-cli ) , [ prettier-standard] ( https://github.com/sheerun/prettier-standard ) , [ standard] ( http://standardjs.com/ ) , [ xo] ( https://github.com/sindresorhus/xo )
117130| JSON | [ fixjson] ( https://github.com/rhysd/fixjson ) , [ jsonlint] ( http://zaa.ch/jsonlint/ ) , [ jq] ( https://stedolan.github.io/jq/ ) , [ prettier] ( https://github.com/prettier/prettier ) |
118131| Kotlin | [ kotlinc] ( https://kotlinlang.org ) !!, [ ktlint] ( https://ktlint.github.io ) !! see ` :help ale-integration-kotlin ` for configuration instructions |
119132| LaTeX | [ alex] ( https://github.com/wooorm/alex ) !!, [ chktex] ( http://www.nongnu.org/chktex/ ) , [ lacheck] ( https://www.ctan.org/pkg/lacheck ) , [ proselint] ( http://proselint.com/ ) , [ redpen] ( http://redpen.cc/ ) , [ vale] ( https://github.com/ValeLint/vale ) , [ write-good] ( https://github.com/btford/write-good ) |
@@ -124,22 +137,24 @@ formatting.
124137| Make | [ checkmake] ( https://github.com/mrtazz/checkmake ) |
125138| Markdown | [ alex] ( https://github.com/wooorm/alex ) !!, [ markdownlint] ( https://github.com/DavidAnson/markdownlint ) !!, [ mdl] ( https://github.com/mivok/markdownlint ) , [ prettier] ( https://github.com/prettier/prettier ) , [ proselint] ( http://proselint.com/ ) , [ redpen] ( http://redpen.cc/ ) , [ remark-lint] ( https://github.com/wooorm/remark-lint ) !!, [ textlint] ( https://textlint.github.io/ ) , [ vale] ( https://github.com/ValeLint/vale ) , [ write-good] ( https://github.com/btford/write-good ) |
126139| MATLAB | [ mlint] ( https://www.mathworks.com/help/matlab/ref/mlint.html ) |
140+ | Mercury | [ mmc] ( http://mercurylang.org ) !! |
141+ | NASM | [ nasm] ( https://www.nasm.us/ ) !! |
127142| Nim | [ nim check] ( https://nim-lang.org/docs/nimc.html ) !! |
128143| nix | [ nix-instantiate] ( http://nixos.org/nix/manual/#sec-nix-instantiate ) |
129144| nroff | [ alex] ( https://github.com/wooorm/alex ) !!, [ proselint] ( http://proselint.com/ ) , [ write-good] ( https://github.com/btford/write-good ) |
130145| Objective-C | [ clang] ( http://clang.llvm.org/ ) |
131146| Objective-C++ | [ clang] ( http://clang.llvm.org/ ) |
132147| OCaml | [ merlin] ( https://github.com/the-lambda-church/merlin ) see ` :help ale-ocaml-merlin ` for configuration instructions, [ ols] ( https://github.com/freebroccolo/ocaml-language-server ) |
133- | Perl | [ perl -c] ( https://perl.org/ ) , [ perl-critic] ( https://metacpan.org/pod/Perl::Critic ) |
148+ | Perl | [ perl -c] ( https://perl.org/ ) , [ perl-critic] ( https://metacpan.org/pod/Perl::Critic ) , [ perltidy ] ( https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy ) |
134149| PHP | [ hack] ( http://hacklang.org/ ) , [ hackfmt] ( https://github.com/facebook/flow/tree/master/hack/hackfmt ) , [ langserver] ( https://github.com/felixfbecker/php-language-server ) , [ phan] ( https://github.com/phan/phan ) see ` :help ale-php-phan ` to instructions, [ php -l] ( https://secure.php.net/ ) , [ phpcs] ( https://github.com/squizlabs/PHP_CodeSniffer ) , [ phpmd] ( https://phpmd.org ) , [ phpstan] ( https://github.com/phpstan/phpstan ) , [ phpcbf] ( https://github.com/squizlabs/PHP_CodeSniffer ) , [ php-cs-fixer] ( http://cs.sensiolabs.org/ ) |
135150| PO | [ alex] ( https://github.com/wooorm/alex ) !!, [ msgfmt] ( https://www.gnu.org/software/gettext/manual/html_node/msgfmt-Invocation.html ) , [ proselint] ( http://proselint.com/ ) , [ write-good] ( https://github.com/btford/write-good ) |
136151| Pod | [ alex] ( https://github.com/wooorm/alex ) !!, [ proselint] ( http://proselint.com/ ) , [ write-good] ( https://github.com/btford/write-good ) |
137152| Pony | [ ponyc] ( https://github.com/ponylang/ponyc ) |
138153| proto | [ protoc-gen-lint] ( https://github.com/ckaznocha/protoc-gen-lint ) |
139154| Pug | [ pug-lint] ( https://github.com/pugjs/pug-lint ) |
140155| Puppet | [ puppet] ( https://puppet.com ) , [ puppet-lint] ( https://puppet-lint.com ) |
141- | Python | [ autopep8] ( https://github.com/hhatto/autopep8 ) , [ flake8] ( http://flake8.pycqa.org/en/latest/ ) , [ isort] ( https://github.com/timothycrosley/isort ) , [ mypy] ( http://mypy-lang.org/ ) , [ prospector] ( https://github.com/landscapeio/prospector ) , [ pycodestyle] ( https://github.com/PyCQA/pycodestyle ) , [ pyls] ( https://github.com/palantir/python-language-server ) , [ pylint] ( https://www.pylint.org/ ) !!, [ yapf] ( https://github.com/google/yapf ) |
142- | QML | [ qmllint] ( https://github.com/qt/qtdeclarative/tree/5.11/tools/qmllint ) |
156+ | Python | [ autopep8] ( https://github.com/hhatto/autopep8 ) , [ black ] ( https://github.com/ambv/black ) , [ flake8] ( http://flake8.pycqa.org/en/latest/ ) , [ isort] ( https://github.com/timothycrosley/isort ) , [ mypy] ( http://mypy-lang.org/ ) , [ prospector] ( https://github.com/landscapeio/prospector ) , [ pycodestyle] ( https://github.com/PyCQA/pycodestyle ) , [ pyls] ( https://github.com/palantir/python-language-server ) , [ pylint] ( https://www.pylint.org/ ) !!, [ yapf] ( https://github.com/google/yapf ) |
157+ | QML | [ qmlfmt ] ( https://github.com/jesperhh/qmlfmt ) , [ qmllint] ( https://github.com/qt/qtdeclarative/tree/5.11/tools/qmllint ) |
143158| R | [ lintr] ( https://github.com/jimhester/lintr ) |
144159| ReasonML | [ merlin] ( https://github.com/the-lambda-church/merlin ) see ` :help ale-reasonml-ols ` for configuration instructions, [ ols] ( https://github.com/freebroccolo/ocaml-language-server ) , [ refmt] ( https://github.com/reasonml/reason-cli ) |
145160| reStructuredText | [ alex] ( https://github.com/wooorm/alex ) !!, [ proselint] ( http://proselint.com/ ) , [ redpen] ( http://redpen.cc/ ) , [ rstcheck] ( https://github.com/myint/rstcheck ) , [ vale] ( https://github.com/ValeLint/vale ) , [ write-good] ( https://github.com/btford/write-good ) |
@@ -149,7 +164,7 @@ formatting.
149164| Rust | cargo !! (see ` :help ale-integration-rust ` for configuration instructions), [ rls] ( https://github.com/rust-lang-nursery/rls ) , [ rustc] ( https://www.rust-lang.org/ ) , [ rustfmt] ( https://github.com/rust-lang-nursery/rustfmt ) |
150165| SASS | [ sass-lint] ( https://www.npmjs.com/package/sass-lint ) , [ stylelint] ( https://github.com/stylelint/stylelint ) |
151166| SCSS | [ prettier] ( https://github.com/prettier/prettier ) , [ sass-lint] ( https://www.npmjs.com/package/sass-lint ) , [ scss-lint] ( https://github.com/brigade/scss-lint ) , [ stylelint] ( https://github.com/stylelint/stylelint ) |
152- | Scala | [ scalac] ( http://scala-lang.org ) , [ scalastyle] ( http://www.scalastyle.org ) |
167+ | Scala | [ fsc ] ( https://www.scala-lang.org/old/sites/default/files/linuxsoft_archives/docu/files/tools/fsc.html ) , [ scalac] ( http://scala-lang.org ) , [ scalastyle] ( http://www.scalastyle.org ) |
153168| Slim | [ slim-lint] ( https://github.com/sds/slim-lint ) |
154169| SML | [ smlnj] ( http://www.smlnj.org/ ) |
155170| Solidity | [ solhint] ( https://github.com/protofire/solhint ) , [ solium] ( https://github.com/duaraghav8/Solium ) |
@@ -220,9 +235,7 @@ too. See `:help ale-fix` for detailed information.
220235
221236ALE offers some support for completion via hijacking of omnicompletion while you
222237type. All of ALE's completion information must come from Language Server
223- Protocol linters, or similar protocols. At the moment, completion is only
224- supported for TypeScript code with ` tsserver ` , when ` tsserver ` is enabled. You
225- can enable completion like so:
238+ Protocol linters, or from ` tsserver ` for TypeSript.
226239
227240``` vim
228241" Enable completion where available.
@@ -236,10 +249,31 @@ See `:help ale-completion` for more information.
236249### 2.iv Go To Definition
237250
238251ALE supports jumping to the definition of words under your cursor with the
239- ` :ALEGoToDefinition ` command using any enabled LSP linters and ` tsserver ` .
252+ ` :ALEGoToDefinition ` command using any enabled Language Server Protocol linters
253+ and ` tsserver ` .
240254
241255See ` :help ale-go-to-definition ` for more information.
242256
257+ <a name =" usage-find-references " ></a >
258+
259+ ### 2.v Find References
260+
261+ ALE supports finding references for words under your cursor with the
262+ ` :ALEFindReferences ` command using any enabled Language Server Protocol linters
263+ and ` tsserver ` .
264+
265+ See ` :help ale-find-references ` for more information.
266+
267+ <a name =" usage-hover " ></a >
268+
269+ ### 2.vi Hovering
270+
271+ ALE supports "hover" information for printing brief information about symbols at
272+ the cursor taken from Language Server Protocol linters and ` tsserver ` with the
273+ ` ALEHover ` command.
274+
275+ See ` :help ale-hover ` for more information.
276+
243277<a name =" installation " ></a >
244278
245279## 3. Installation
@@ -482,6 +516,8 @@ There are 3 global options that allow customizing the echoed message.
482516
483517- ` g:ale_echo_msg_format ` where:
484518 * ` %s ` is the error message itself
519+ * ` %...code...% ` is an optional error code, and most characters can be
520+ written between the ` % ` characters.
485521 * ` %linter% ` is the linter name
486522 * ` %severity ` is the severity type
487523- ` g:ale_echo_msg_error_str ` is the string used for error severity.
@@ -499,22 +535,28 @@ Will give you:
499535
500536![ Echoed message] ( img/echo.png )
501537
538+ See ` :help g:ale_echo_msg_format ` for more information.
539+
502540<a name =" faq-autocmd " ></a >
503541
504542### 5.viii. How can I execute some code when ALE starts or stops linting?
505543
506544ALE runs its own [ autocmd] ( http://vimdoc.sourceforge.net/htmldoc/autocmd.html )
507- events when a lint or fix cycle are started and stopped. These events can be
508- used to call arbitrary functions before and after ALE stops linting.
545+ events when a lint or fix cycle are started and stopped. There is also an event
546+ that runs when a linter job has been successfully started. These events can be
547+ used to call arbitrary functions during these respective parts of the ALE's
548+ operation.
509549
510550``` vim
511551augroup YourGroup
512552 autocmd!
513- autocmd User ALELintPre call YourFunction()
514- autocmd User ALELintPost call YourFunction()
553+ autocmd User ALELintPre call YourFunction()
554+ autocmd User ALELintPost call YourFunction()
555+
556+ autocmd User ALEJobStarted call YourFunction()
515557
516- autocmd User ALEFixPre call YourFunction()
517- autocmd User ALEFixPost call YourFunction()
558+ autocmd User ALEFixPre call YourFunction()
559+ autocmd User ALEFixPost call YourFunction()
518560augroup END
519561```
520562
0 commit comments