Extend statusline interface (#2240)

* Extended statusline.vim to provide an efficient way to access the first errors,warnings,stylerrors,stylewarnings,etc from the loclist.
* Added documentation and help for the new API function.
This commit is contained in:
petpetpetpet
2019-01-27 12:44:49 +00:00
committed by w0rp
parent a7b3b84899
commit 3c38fdb1bb
4 changed files with 171 additions and 27 deletions

View File

@@ -3159,6 +3159,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