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

Merge branch 'lsp' into dev

close #512
This commit is contained in:
wsdjeg 2017-11-13 20:18:44 +08:00
commit d042550b05
4 changed files with 25 additions and 11 deletions

View File

@ -544,7 +544,7 @@ function! SpaceVim#end() abort
call add(g:spacevim_plugin_groups, 'colorscheme') call add(g:spacevim_plugin_groups, 'colorscheme')
endif endif
if has('nvim') if has('python3')
let g:spacevim_autocomplete_method = 'deoplete' let g:spacevim_autocomplete_method = 'deoplete'
elseif has('lua') elseif has('lua')
let g:spacevim_autocomplete_method = 'neocomplete' let g:spacevim_autocomplete_method = 'neocomplete'

View File

@ -58,6 +58,10 @@ function! SpaceVim#layers#autocomplete#plugins() abort
\ 'on_event' : 'InsertEnter', \ 'on_event' : 'InsertEnter',
\ 'loadconf' : 1, \ 'loadconf' : 1,
\ }]) \ }])
if !has('nvim')
call add(plugins, ['SpaceVim/nvim-yarp', {'merged': 0}])
call add(plugins, ['SpaceVim/vim-hug-neovim-rpc', {'merged': 0}])
endif
endif endif
if has('patch-7.4.774') if has('patch-7.4.774')
call add(plugins, ['Shougo/echodoc.vim', { call add(plugins, ['Shougo/echodoc.vim', {
@ -67,6 +71,7 @@ function! SpaceVim#layers#autocomplete#plugins() abort
\ }]) \ }])
endif endif
call add(plugins, ['tenfyzhong/CompleteParameter.vim', {'merged': 0}]) call add(plugins, ['tenfyzhong/CompleteParameter.vim', {'merged': 0}])
call add(plugins, ['SpaceVim/LanguageClient-neovim', {'merged': 0}])
return plugins return plugins
endfunction endfunction

View File

@ -90,7 +90,12 @@ let g:deoplete#keyword_patterns.clojure = '[\w!$%&*+/:<=>?@\^_~\-\.#]*'
" public settings " public settings
call deoplete#custom#set('_', 'matchers', ['matcher_full_fuzzy']) call deoplete#custom#set('_', 'matchers', ['matcher_full_fuzzy'])
let g:deoplete#ignore_sources._ = get(g:deoplete#ignore_sources, '_', ['around']) let g:deoplete#ignore_sources._ = get(g:deoplete#ignore_sources, '_', ['around', 'LanguageClient'])
for key in keys(g:deoplete#ignore_sources)
if key != '_' && index(keys(get(g:, 'LanguageClient_serverCommands', {})), key) == -1
let g:deoplete#ignore_sources[key] = g:deoplete#ignore_sources[key] + ['around', 'LanguageClient']
endif
endfor
inoremap <expr><C-h> deoplete#mappings#smart_close_popup()."\<C-h>" inoremap <expr><C-h> deoplete#mappings#smart_close_popup()."\<C-h>"
inoremap <expr><BS> deoplete#mappings#smart_close_popup()."\<C-h>" inoremap <expr><BS> deoplete#mappings#smart_close_popup()."\<C-h>"
set isfname-== set isfname-==

View File

@ -5,15 +5,17 @@ title: "SpaceVim autocomplete layer"
# [SpaceVim Layers:](https://spacevim.org/layers) autocomplete # [SpaceVim Layers:](https://spacevim.org/layers) autocomplete
<!-- vim-markdown-toc GFM --> <!-- vim-markdown-toc GFM -->
* [Description](#description)
* [Install](#install) - [Description](#description)
* [Configuration](#configuration) - [Install](#install)
* [Key bindings](#key-bindings) - [Configuration](#configuration)
* [Snippets directories](#snippets-directories) - [Key bindings](#key-bindings)
* [Show snippets in auto-completion popup](#show-snippets-in-auto-completion-popup) - [Snippets directories](#snippets-directories)
* [Key bindings](#key-bindings-1) - [Show snippets in auto-completion popup](#show-snippets-in-auto-completion-popup)
* [auto-complete](#auto-complete) - [LSP supported](#lsp-supported)
* [Neosnippet](#neosnippet) - [Key bindings](#key-bindings-1)
- [auto-complete](#auto-complete)
- [Neosnippet](#neosnippet)
<!-- vim-markdown-toc --> <!-- vim-markdown-toc -->
@ -95,6 +97,8 @@ call SpaceVim#layers#load('autocomplete', {
\ }) \ })
``` ```
## LSP supported
## Key bindings ## Key bindings
### auto-complete ### auto-complete