mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 15:10:04 +08:00
Fix leaderf mru support (#3171)
This commit is contained in:
parent
daaec1b369
commit
453a1e83d1
@ -36,6 +36,16 @@ function! SpaceVim#layers#leaderf#config() abort
|
|||||||
let g:Lf_ShortcutF = ''
|
let g:Lf_ShortcutF = ''
|
||||||
let g:Lf_ShortcutB = ''
|
let g:Lf_ShortcutB = ''
|
||||||
|
|
||||||
|
let g:Lf_Extensions = get(g:, 'Lf_Extensions', {})
|
||||||
|
let g:Lf_Extensions = {
|
||||||
|
\ "neomru": {
|
||||||
|
\ "source": string(s:_function('s:neomru', 1))[10:-3],
|
||||||
|
\ "accept": string(s:_function('s:neomru_acp', 1))[10:-3],
|
||||||
|
\ "supports_name_only": 1,
|
||||||
|
\ "supports_multi": 0,
|
||||||
|
\ },
|
||||||
|
\}
|
||||||
|
|
||||||
let g:Lf_Extensions.menu =
|
let g:Lf_Extensions.menu =
|
||||||
\ {
|
\ {
|
||||||
\ "source": string(s:_function('s:menu', 1))[10:-3],
|
\ "source": string(s:_function('s:menu', 1))[10:-3],
|
||||||
@ -193,15 +203,6 @@ function! SpaceVim#layers#leaderf#config() abort
|
|||||||
\ 1)
|
\ 1)
|
||||||
|
|
||||||
let lnum = expand('<slnum>') + s:lnum - 1
|
let lnum = expand('<slnum>') + s:lnum - 1
|
||||||
" let g:Lf_Extensions = get(g:, 'Lf_Extensions', {})
|
|
||||||
" let g:Lf_Extensions = {
|
|
||||||
" \ "neomru": {
|
|
||||||
" \ "source": function("neomru#_gather_file_candidates()"),
|
|
||||||
" \ "accept": function("s:accept_mru"),
|
|
||||||
" \ "supports_name_only": 1,
|
|
||||||
" \ "supports_multi": 0,
|
|
||||||
" \ },
|
|
||||||
" \}
|
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 'r'], 'Leaderf neomru',
|
call SpaceVim#mapping#space#def('nnoremap', ['f', 'r'], 'Leaderf neomru',
|
||||||
\ ['open-recent-file',
|
\ ['open-recent-file',
|
||||||
\ [
|
\ [
|
||||||
@ -304,6 +305,14 @@ function! s:register_acp(line, args)
|
|||||||
echohl None
|
echohl None
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:neomru(...) abort
|
||||||
|
return neomru#_gather_file_candidates()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:neomru_acp(line, args) abort
|
||||||
|
exe 'e' a:line
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! s:jumplist(...) abort
|
function! s:jumplist(...) abort
|
||||||
return split(s:CMP.execute('jumps'), '\n')[1:]
|
return split(s:CMP.execute('jumps'), '\n')[1:]
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user