mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Supporting filtered jump (#2279)
* Support filtered jump based on loclist item type (E or W for now) * Use flags to customize the behavior of ALENext and ALEPrevious * Update <plug> bindings with flags * Update documentation about ALENext and ALEPrevious * Use ale#args#Parse in JumpWrap
This commit is contained in:
@@ -151,9 +151,12 @@ if g:ale_completion_enabled
|
||||
endif
|
||||
|
||||
" Define commands for moving through warnings and errors.
|
||||
command! -bar ALEPrevious :call ale#loclist_jumping#Jump('before', 0)
|
||||
command! -bar -nargs=* ALEPrevious
|
||||
\ :call ale#loclist_jumping#WrapJump('before', <q-args>)
|
||||
command! -bar -nargs=* ALENext
|
||||
\ :call ale#loclist_jumping#WrapJump('after', <q-args>)
|
||||
|
||||
command! -bar ALEPreviousWrap :call ale#loclist_jumping#Jump('before', 1)
|
||||
command! -bar ALENext :call ale#loclist_jumping#Jump('after', 0)
|
||||
command! -bar ALENextWrap :call ale#loclist_jumping#Jump('after', 1)
|
||||
command! -bar ALEFirst :call ale#loclist_jumping#JumpToIndex(0)
|
||||
command! -bar ALELast :call ale#loclist_jumping#JumpToIndex(-1)
|
||||
@@ -218,8 +221,16 @@ command! -bar ALEComplete :call ale#completion#AlwaysGetCompletions(0)
|
||||
" <Plug> mappings for commands
|
||||
nnoremap <silent> <Plug>(ale_previous) :ALEPrevious<Return>
|
||||
nnoremap <silent> <Plug>(ale_previous_wrap) :ALEPreviousWrap<Return>
|
||||
nnoremap <silent> <Plug>(ale_previous_error) :ALEPrevious -error<Return>
|
||||
nnoremap <silent> <Plug>(ale_previous_wrap_error) :ALEPrevious -wrap -error<Return>
|
||||
nnoremap <silent> <Plug>(ale_previous_warning) :ALEPrevious -warning<Return>
|
||||
nnoremap <silent> <Plug>(ale_previous_wrap_warning) :ALEPrevious -wrap -warning<Return>
|
||||
nnoremap <silent> <Plug>(ale_next) :ALENext<Return>
|
||||
nnoremap <silent> <Plug>(ale_next_wrap) :ALENextWrap<Return>
|
||||
nnoremap <silent> <Plug>(ale_next_error) :ALENext -error<Return>
|
||||
nnoremap <silent> <Plug>(ale_next_wrap_error) :ALENext -wrap -error<Return>
|
||||
nnoremap <silent> <Plug>(ale_next_warning) :ALENext -warning<Return>
|
||||
nnoremap <silent> <Plug>(ale_next_wrap_warning) :ALENext -wrap -warning<Return>
|
||||
nnoremap <silent> <Plug>(ale_first) :ALEFirst<Return>
|
||||
nnoremap <silent> <Plug>(ale_last) :ALELast<Return>
|
||||
nnoremap <silent> <Plug>(ale_toggle) :ALEToggle<Return>
|
||||
|
||||
Reference in New Issue
Block a user