1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 07:20:04 +08:00

perf(neovim): use nvim-cmp & skip checking python

This commit is contained in:
Eric Wong 2024-06-16 15:18:05 +08:00
parent 0230993946
commit bcbe5023d0
4 changed files with 18 additions and 5 deletions

View File

@ -362,7 +362,9 @@ let g:spacevim_leader_guide_theme = 'leaderguide'
" let g:spacevim_enable_key_frequency = 1
" <
let g:spacevim_enable_key_frequency = 0
if (has('python3')
if has('nvim-0.9.0')
let g:spacevim_autocomplete_method = 'nvim-cmp'
elseif (has('python3')
\ && (SpaceVim#util#haspy3lib('neovim')
\ || SpaceVim#util#haspy3lib('pynvim'))) &&
\ (has('nvim') || (has('patch-8.0.0027')))
@ -372,7 +374,9 @@ if (has('python3')
" @parentsection options
" Set the autocomplete engine of spacevim, the default logic is:
" >
" if has('python3')
" if has('nvim-0.9.0')
" let g:spacevim_autocomplete_method = 'nvim-cmp'
" elseif has('python3')
" let g:spacevim_autocomplete_method = 'deoplete'
" elseif has('lua')
" let g:spacevim_autocomplete_method = 'neocomplete'
@ -392,7 +396,9 @@ if (has('python3')
""
" Set the autocomplete engine of spacevim, the default logic is:
" >
" if has('python3')
" if has('nvim-0.9.0')
" let g:spacevim_autocomplete_method = 'nvim-cmp'
" elseif has('python3')
" let g:spacevim_autocomplete_method = 'deoplete'
" elseif has('lua')
" let g:spacevim_autocomplete_method = 'neocomplete'

View File

@ -325,7 +325,9 @@ AUTOCOMPLETE_METHOD *SpaceVim-options-autocomplete_method*
Set the autocomplete engine of spacevim, the default logic is:
>
if has('python3')
if has('nvim-0.9.0')
let g:spacevim_autocomplete_method = 'nvim-cmp'
elseif has('python3')
let g:spacevim_autocomplete_method = 'deoplete'
elseif has('lua')
let g:spacevim_autocomplete_method = 'neocomplete'
@ -1154,7 +1156,9 @@ enable it:
*g:spacevim_autocomplete_method*
Set the autocomplete engine of spacevim, the default logic is:
>
if has('python3')
if has('nvim-0.9.0')
let g:spacevim_autocomplete_method = 'nvim-cmp'
elseif has('python3')
let g:spacevim_autocomplete_method = 'deoplete'
elseif has('lua')
let g:spacevim_autocomplete_method = 'neocomplete'

View File

@ -62,6 +62,7 @@ SpaceVim 选项 `snippet_engine` 设置为 `ultisnips`,将使用 [UltiSnips](h
- `deoplete`
- `asyncomplete`
- `completor`
- `nvim-cmp`
设置示例:

View File

@ -27,6 +27,7 @@ This layer provides auto-completion in SpaceVim.
The following completion engines are supported:
- nvim-cmp - neovim >= 0.9.0
- [neocomplete](https://github.com/Shougo/neocomplete.vim) - vim with `+lua`
- [neocomplcache](https://github.com/Shougo/neocomplcache.vim) - vim without `+lua`
- [deoplete](https://github.com/Shougo/deoplete.nvim) - neovim with `+python3`
@ -60,6 +61,7 @@ But you can choose the completion engine to be used with the following variable:
- `deoplete`
- `asyncomplete`
- `completor`
- `nvim-cmp`
here is an example: