Open ctjhoa opened 7 years ago
This is probably a bit late for you, but for completion's sake:
If the plugin is unable to find a configuration dictionary on startup it will initialise an empty one:
if !leaderGuide#has_configuration()
let g:leaderGuide_map = {}
call leaderGuide#register_prefix_descriptions('', 'g:leaderGuide_map')
endif
The autocmd is apparently executed after this little snippet.
It's possible to hook the g:lmap dictionary into the top-level one like this:
function! s:vim_enter()
let g:leaderGuide_map[' '] = g:lmap
" registering is no longer necessary
"call leaderGuide#register_prefix_descriptions("<Space>", "g:lmap")
nnoremap <silent> <leader> :<c-u>LeaderGuide '<Space>'<CR>
vnoremap <silent> <leader> :<c-u>LeaderGuideVisual '<Space>'<CR>
endfunction
augroup delayed
autocmd!
autocmd VimEnter * call s:vim_enter()
augroup END
Hi,
A few months ago, I notice a bug with
vim-leader-guide
(https://github.com/ctjhoa/spacevim/issues/32) and I didn't take the time to look at it until now.Here is what I've found. With the current version of
vim-leader-guide
callingregister_prefix_description
from an autocommand will lead to a bug where the name of your entry does not show. If I rollback to the commit bade1b9dfc5e56aaf322791fff11e350fd8681ae it works as intended.I did a
.vimrc
which show the issue:Thanks