1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-25 03:02:21 +08:00

Compare commits

..

No commits in common. "2e6031b927845578a01943d66a0a9ba8a6586a9d" and "abbedafcc8bb57860cca1700081cf1c9e7303e9a" have entirely different histories.

3 changed files with 4 additions and 12 deletions

View File

@ -322,9 +322,6 @@ function! SpaceVim#layers#autocomplete#config() abort
endif
"mapping
"
" 如果使用 nvim-cmp 作为补全引擎,那么 Tab 以及 Enter 快捷键的映射是在
" ./lua/config/nvim-cmp.lua 内设置。
if s:tab_key_behavior ==# 'smart'
if has('patch-7.4.774')
imap <silent><expr><TAB> SpaceVim#mapping#tab()

View File

@ -50,11 +50,11 @@ endfunction
function! SpaceVim#layers#telescope#plugins() abort
let plugins = []
if has('nvim-0.10.0')
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope.nvim-0.1.8', {'merged' : 0, 'loadconf' : 1}])
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope.nvim-0.1.8', {'merged' : 0, 'loadconf' : 1, 'on_cmd' : ['Telescope']}])
elseif has('nvim-0.7.2')
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope.nvim-0.1.5', {'merged' : 0, 'loadconf' : 1}])
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope.nvim-0.1.5', {'merged' : 0, 'loadconf' : 1, 'on_cmd' : ['Telescope']}])
elseif has('nvim-0.7.0')
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope.nvim-0.1.2', {'merged' : 0, 'loadconf' : 1}])
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope.nvim-0.1.2', {'merged' : 0, 'loadconf' : 1, 'on_cmd' : ['Telescope']}])
endif
call add(plugins, [g:_spacevim_root_dir . 'bundle/plenary.nvim', {'merged' : 0}])
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope-menu', {'merged' : 0}])

View File

@ -43,12 +43,7 @@ end
local function enter(f) -- {{{
if copt.auto_completion_return_key_behavior == 'complete' then
if cmp.visible() then
cmp.mapping.confirm({ select = false })
return cmp.close()
else
pcall(f)
end
cmp.mapping.confirm({ select = false })
elseif copt.auto_completion_return_key_behavior == 'smart' then
expand_snippet(nil)
if cmp.visible() then