Search code examples
vimeslintflowtypevim-plugin

Print lint rule out with ALE in Vim


At the moment I have the following in my vimrc to show the linter error message at the bottom of my screen:

let g:ale_echo_msg_format = '%linter% says: %s'

How do I customise this so that I get the name of the lint rule (rather than just the description).


Solution

  • What you're looking for is %code%. See :help g:ale_echo_msg_format. You can put just about any characters you want before or after code, and that part of the message will be removed if there's no error code. The default value for the option is '%code: %%s'.