From 584e0bc7f25563bf4ab3ae738b78d9d13a898f94 Mon Sep 17 00:00:00 2001 From: w0rp Date: Mon, 13 Nov 2017 00:47:34 +0000 Subject: #852 Support formatting echo messages with error codes. No linters set the `code` key yet --- doc/ale.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'doc/ale.txt') diff --git a/doc/ale.txt b/doc/ale.txt index 5638a2c8..3a43685d 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -643,20 +643,27 @@ g:ale_echo_msg_error_str *g:ale_echo_msg_error_str* g:ale_echo_msg_format *g:ale_echo_msg_format* Type: |String| - Default: `'%s'` + Default: `'%code: %%s'` This variable defines a message format for echoed messages. The following sequences of characters will be replaced. - `%s` - will be replaced with the text for the problem - `%linter%` - will be replaced with the name of the linter - `%severity%` - will be replaced withe severity of the problem + `%s` - replaced with the text for the problem + `%...code...% `- replaced with the error code + `%linter%` - replaced with the name of the linter + `%severity%` - replaced withe severity of the problem The strings for `%severity%` can be configured with the following options. |g:ale_echo_msg_error_str| - Defaults to `'Error'` |g:ale_echo_msg_warning_str| - Defaults to `'Warning'` + `%code%` is replaced with the error code, and replaced with an empty string + when there is no error code. Any extra characters between the percent signs + will be printed when an error code is present. For example, a message like + `(error code): message` will be printed for `'%(code): %%s'` and simply the + message will be printed when there is no code. + |g:ale_echo_cursor| needs to be set to 1 for messages to be displayed. -- cgit v1.2.3