1

I've installed dense-analysis/ale from this repo: https://github.com/dense-analysis/ale

I'm trying to use it to detect errors automatically in my Elm projects.

Errors are detected since they are highlighted with a ">>" in red. However, since my source file is pretty long, it's impossible for me to know immediately whether there's an error or not.

A solution should be to type :cn to jump to the next error. But then I just get the reply "E42: No Error". And it doesn't jump to the error, even when there's an error in the file.

I'd like to be notified immediately when there's an error, or, alternatively, be able to check with a simple command like :cn.

How to achieve that?

My setup:

  • vim version 8.2
  • elm version 0.19.1
  • elm-language-server version 2.4.1
  • elm-format 0.8.5
  • ALE v3.2.0 (I actually just cloned the project into my .vim/bundle directory)
4

1 Answer 1

1

You can use the :ALENext command to jump to the next error found by ALE.

See :help ale-navigation-commands for the list of navigation commands provided by ALE itself.

If you'd like to create mappings for quicker navigation, ALE also exposes some <Plug> mappings that you can map to key combinations that suit you.

This entry in ALE's README.md suggests a setup using Ctrl+k and Ctrl+j to jump to the previous/next error, respectively:

nmap <silent> <C-k> <Plug>(ale_previous_wrap)
nmap <silent> <C-j> <Plug>(ale_next_wrap)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.