From 8ec9409fda9b9a4e6fee4a303ec653898057f4b4 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Thu, 20 Oct 2022 21:19:38 +0800 Subject: [PATCH] feat(todo): use lua todo manager for neovim --- autoload/SpaceVim/mapping/space.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/SpaceVim/mapping/space.vim b/autoload/SpaceVim/mapping/space.vim index d6376b146..a7249b2fb 100644 --- a/autoload/SpaceVim/mapping/space.vim +++ b/autoload/SpaceVim/mapping/space.vim @@ -699,7 +699,11 @@ function! SpaceVim#mapping#space#init() abort \ ] \ ] \ , 1) - call SpaceVim#custom#SPC('nnoremap', ['a', 'o'], 'call SpaceVim#plugins#todo#list()', 'open-todo-manager', 1) + if has('nvim-0.7.0') + call SpaceVim#custom#SPC('nnoremap', ['a', 'o'], 'lua require("spacevim.plugin.todo").list()', 'open-todo-manager', 1) + else + call SpaceVim#custom#SPC('nnoremap', ['a', 'o'], 'call SpaceVim#plugins#todo#list()', 'open-todo-manager', 1) + endif endfunction function! SpaceVim#mapping#space#def(m, keys, cmd, desc, is_cmd, ...) abort