2017-02-20 00:07:02 +08:00
|
|
|
" deoplete options
|
2016-12-26 21:11:19 +08:00
|
|
|
let g:deoplete#enable_at_startup = 1
|
|
|
|
let g:deoplete#enable_ignore_case = 1
|
|
|
|
let g:deoplete#enable_smart_case = 1
|
|
|
|
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
|
2017-02-20 00:07:02 +08:00
|
|
|
" init deoplet option dict
|
|
|
|
let g:deoplete#ignore_sources = get(g:,'deoplete#ignore_sources',{})
|
2016-12-26 21:11:19 +08:00
|
|
|
let g:deoplete#omni#input_patterns = get(g:,'deoplete#omni#input_patterns',{})
|
2017-02-20 00:07:02 +08:00
|
|
|
let g:deoplete#omni_patterns = get(g:, 'deoplete#omni_patterns', {})
|
|
|
|
|
|
|
|
" java && jsp
|
2016-12-26 21:11:19 +08:00
|
|
|
let g:deoplete#omni#input_patterns.java = [
|
|
|
|
\'[^. \t0-9]\.\w*',
|
|
|
|
\'[^. \t0-9]\->\w*',
|
|
|
|
\'[^. \t0-9]\::\w*',
|
|
|
|
\]
|
2017-02-20 00:07:02 +08:00
|
|
|
let g:deoplete#omni#input_patterns.jsp = ['[^. \t0-9]\.\w*']
|
|
|
|
if g:spacevim_enable_javacomplete2_py
|
|
|
|
let g:deoplete#ignore_sources.java = ['omni']
|
|
|
|
call deoplete#custom#set('javacomplete2', 'mark', '')
|
|
|
|
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
|
2017-01-25 22:12:23 +08:00
|
|
|
let g:deoplete#omni#input_patterns.perl = [
|
|
|
|
\'[^. \t0-9]\.\w*',
|
|
|
|
\'[^. \t0-9]\->\w*',
|
|
|
|
\'[^. \t0-9]\::\w*',
|
|
|
|
\]
|
2017-02-20 00:07:02 +08:00
|
|
|
|
|
|
|
" javascript
|
2017-01-21 21:47:36 +08:00
|
|
|
let g:deoplete#omni#input_patterns.javascript = ['[^. \t0-9]\.\w*']
|
2017-02-20 00:07:02 +08:00
|
|
|
|
|
|
|
" php
|
|
|
|
let g:deoplete#omni#input_patterns.php = [
|
|
|
|
\'[^. \t0-9]\.\w*',
|
|
|
|
\'[^. \t0-9]\->\w*',
|
|
|
|
\'[^. \t0-9]\::\w*',
|
|
|
|
\]
|
|
|
|
|
|
|
|
" lua
|
2017-01-24 22:47:48 +08:00
|
|
|
let g:deoplete#omni_patterns.lua = '.'
|
2017-02-20 00:07:02 +08:00
|
|
|
|
|
|
|
" c c++
|
|
|
|
call deoplete#custom#set('clang2', 'mark', '')
|
2017-01-18 23:56:06 +08:00
|
|
|
let g:deoplete#ignore_sources.c = ['omni']
|
2017-02-20 00:07:02 +08:00
|
|
|
|
|
|
|
" rust
|
2017-01-26 16:07:23 +08:00
|
|
|
let g:deoplete#ignore_sources.rust = ['omni']
|
|
|
|
call deoplete#custom#set('racer', 'mark', '')
|
2017-02-20 00:07:02 +08:00
|
|
|
|
|
|
|
" public settings
|
2016-12-26 21:11:19 +08:00
|
|
|
call deoplete#custom#set('_', 'matchers', ['matcher_full_fuzzy'])
|
2016-12-27 22:52:31 +08:00
|
|
|
let g:deoplete#ignore_sources._ = ['around']
|
2016-12-26 21:11:19 +08:00
|
|
|
inoremap <expr><C-h> deoplete#mappings#smart_close_popup()."\<C-h>"
|
|
|
|
inoremap <expr><BS> deoplete#mappings#smart_close_popup()."\<C-h>"
|
|
|
|
set isfname-==
|