diff options
author | Magnus Groß <21310755+vimpostor@users.noreply.github.com> | 2022-09-07 12:38:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-07 19:38:01 +0900 |
commit | 9feba1148c7949523108a38ab45297d5ed0d5b1a (patch) | |
tree | 7183d6bcb8d305615964ff6e63dfecc5c0fa74ee /doc | |
parent | 4943b7d39f75cb19e5be6c0cab94132655f07f07 (diff) | |
download | ale-9feba1148c7949523108a38ab45297d5ed0d5b1a.zip |
Implement buffer-wide virtual text support (#4289)
* Remove virtual text via types-filter
This is more robust and has the additional sideeffect that it will make
it easier to implement showing virtual text for all warnings
simultaneously.
We definitely do not want to do a call to prop_remove() for every
virtual text as that will cause noticeable lag when many warnings are
present, thus we can use this to remove all virtual text lines with one
call in the future.
Fixes #4294
refs: https://github.com/vim/vim/pull/10945
* Allow virtual text to appear for all warnings of the buffer
This can be enabled with:
let g:ale_virtualtext_cursor = 2
It is implemented both for neovim and vim 9.0.0297.
Note that sometimes it may appear like some warnings are displayed
multiple times. This is not a bug in the virtual text implementation,
but a sideeffect of multiple linters returning similar results.
For example for Rust, the 'cargo' and 'rls' linters appear to be
activated at the same time, but they sometimes return identical errors.
This causes the virtual text to show the same warning twice.
In the future we can mitigate this problem by removing duplicate errors
from our internal location list.
However users can also achieve cleaner warnings simply by activating
only one linter for each language (or multiple unambiguous linters).
For example for Rust, the problem could be solved with:
let g:ale_linters = {'rust': ['analyzer']}
Fixes #2962
Fixes #3666
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ale.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/ale.txt b/doc/ale.txt index c9cb8585..049f7159 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -2297,6 +2297,9 @@ g:ale_virtualtext_cursor *g:ale_virtualtext_cursor* column nearest to the cursor when the cursor is resting on a line which contains a warning or error. This option can be set to `0` to disable this behavior. + When this option is set to `2`, then all warnings will be shown for the + whole buffer, regardless of if the cursor is currently positioned in that + line. Messages are only displayed after a short delay. See |g:ale_virtualtext_delay|. |