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

Fix deoplete setting

This commit is contained in:
wsdjeg 2017-02-20 00:07:02 +08:00
parent 738e724f07
commit b1b33d47f0

View File

@ -1,3 +1,4 @@
" deoplete options
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_ignore_case = 1
let g:deoplete#enable_smart_case = 1
@ -5,32 +6,18 @@ let g:deoplete#enable_camel_case = 1
let g:deoplete#enable_refresh_always = 1
let g:deoplete#max_abbr_width = 0
let g:deoplete#max_menu_width = 0
" init deoplet option dict
let g:deoplete#ignore_sources = get(g:,'deoplete#ignore_sources',{})
let g:deoplete#omni#input_patterns = get(g:,'deoplete#omni#input_patterns',{})
let g:deoplete#omni_patterns = get(g:, 'deoplete#omni_patterns', {})
" java && jsp
let g:deoplete#omni#input_patterns.java = [
\'[^. \t0-9]\.\w*',
\'[^. \t0-9]\->\w*',
\'[^. \t0-9]\::\w*',
\]
let g:deoplete#omni#input_patterns.perl = [
\'[^. \t0-9]\.\w*',
\'[^. \t0-9]\->\w*',
\'[^. \t0-9]\::\w*',
\]
let g:deoplete#omni#input_patterns.jsp = ['[^. \t0-9]\.\w*']
let g:deoplete#omni#input_patterns.javascript = ['[^. \t0-9]\.\w*']
let g:deoplete#omni#input_patterns.php = '\h\w*\|[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
let g:deoplete#omni_patterns = get(g:, 'deoplete#omni_patterns', {})
let g:deoplete#omni_patterns.php = '->\|::'
let g:deoplete#omni_patterns.lua = '.'
let g:deoplete#ignore_sources = {}
let g:deoplete#ignore_sources.go = ['omni']
let g:deoplete#ignore_sources.c = ['omni']
let g:deoplete#ignore_sources.rust = ['omni']
let g:deoplete#ignore_sources.perl = ['omni']
call deoplete#custom#set('go', 'mark', '')
call deoplete#custom#set('go', 'rank', 9999)
call deoplete#custom#set('clang2', 'mark', '')
call deoplete#custom#set('racer', 'mark', '')
if g:spacevim_enable_javacomplete2_py
let g:deoplete#ignore_sources.java = ['omni']
call deoplete#custom#set('javacomplete2', 'mark', '')
@ -38,9 +25,43 @@ else
let g:deoplete#ignore_sources.java = ['javacomplete2']
call deoplete#custom#set('omni', 'mark', '')
endif
" go
let g:deoplete#ignore_sources.go = ['omni']
call deoplete#custom#set('go', 'mark', '')
call deoplete#custom#set('go', 'rank', 9999)
" perl
let g:deoplete#omni#input_patterns.perl = [
\'[^. \t0-9]\.\w*',
\'[^. \t0-9]\->\w*',
\'[^. \t0-9]\::\w*',
\]
" javascript
let g:deoplete#omni#input_patterns.javascript = ['[^. \t0-9]\.\w*']
" php
let g:deoplete#omni#input_patterns.php = [
\'[^. \t0-9]\.\w*',
\'[^. \t0-9]\->\w*',
\'[^. \t0-9]\::\w*',
\]
" lua
let g:deoplete#omni_patterns.lua = '.'
" c c++
call deoplete#custom#set('clang2', 'mark', '')
let g:deoplete#ignore_sources.c = ['omni']
" rust
let g:deoplete#ignore_sources.rust = ['omni']
call deoplete#custom#set('racer', 'mark', '')
" public settings
call deoplete#custom#set('_', 'matchers', ['matcher_full_fuzzy'])
let g:deoplete#ignore_sources._ = ['around']
"call deoplete#custom#set('omni', 'min_pattern_length', 0)
inoremap <expr><C-h> deoplete#mappings#smart_close_popup()."\<C-h>"
inoremap <expr><BS> deoplete#mappings#smart_close_popup()."\<C-h>"
set isfname-==