mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 11:20:06 +08:00
Compare commits
2 Commits
abbedafcc8
...
2e6031b927
Author | SHA1 | Date | |
---|---|---|---|
|
2e6031b927 | ||
|
c2c8a96161 |
@ -322,6 +322,9 @@ 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()
|
||||
|
@ -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, 'on_cmd' : ['Telescope']}])
|
||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope.nvim-0.1.8', {'merged' : 0, 'loadconf' : 1}])
|
||||
elseif has('nvim-0.7.2')
|
||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope.nvim-0.1.5', {'merged' : 0, 'loadconf' : 1, 'on_cmd' : ['Telescope']}])
|
||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope.nvim-0.1.5', {'merged' : 0, 'loadconf' : 1}])
|
||||
elseif has('nvim-0.7.0')
|
||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope.nvim-0.1.2', {'merged' : 0, 'loadconf' : 1, 'on_cmd' : ['Telescope']}])
|
||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/telescope.nvim-0.1.2', {'merged' : 0, 'loadconf' : 1}])
|
||||
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}])
|
||||
|
@ -43,7 +43,12 @@ end
|
||||
|
||||
local function enter(f) -- {{{
|
||||
if copt.auto_completion_return_key_behavior == 'complete' then
|
||||
cmp.mapping.confirm({ select = false })
|
||||
if cmp.visible() then
|
||||
cmp.mapping.confirm({ select = false })
|
||||
return cmp.close()
|
||||
else
|
||||
pcall(f)
|
||||
end
|
||||
elseif copt.auto_completion_return_key_behavior == 'smart' then
|
||||
expand_snippet(nil)
|
||||
if cmp.visible() then
|
||||
|
Loading…
Reference in New Issue
Block a user