mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
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:
15
doc/ale.txt
15
doc/ale.txt
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user