spacevim/config/plugins/deoplete.vim
JIe 2bb7059579
Some checks failed
Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
Detach Plugins / check (GitHub.vim) (push) Has been cancelled
Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
Detach Plugins / check (git.vim) (push) Has been cancelled
Detach Plugins / check (iedit.vim) (push) Has been cancelled
Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
Detach Plugins / check (vim-chat) (push) Has been cancelled
Detach Plugins / check (vim-cheat) (push) Has been cancelled
Detach Plugins / check (vim-todo) (push) Has been cancelled
Detach Plugins / check (xmake.vim) (push) Has been cancelled
test / Linux (nvim, nightly) (push) Has been cancelled
test / Linux (nvim, v0.3.8) (push) Has been cancelled
test / Linux (nvim, v0.4.0) (push) Has been cancelled
test / Linux (nvim, v0.4.2) (push) Has been cancelled
test / Linux (nvim, v0.4.3) (push) Has been cancelled
test / Linux (nvim, v0.4.4) (push) Has been cancelled
test / Linux (nvim, v0.5.0) (push) Has been cancelled
test / Linux (nvim, v0.5.1) (push) Has been cancelled
test / Linux (nvim, v0.6.0) (push) Has been cancelled
test / Linux (nvim, v0.6.1) (push) Has been cancelled
test / Linux (nvim, v0.7.0) (push) Has been cancelled
test / Linux (nvim, v0.7.2) (push) Has been cancelled
test / Linux (nvim, v0.8.0) (push) Has been cancelled
test / Linux (nvim, v0.8.1) (push) Has been cancelled
test / Linux (nvim, v0.8.2) (push) Has been cancelled
test / Linux (nvim, v0.8.3) (push) Has been cancelled
test / Linux (nvim, v0.9.0) (push) Has been cancelled
test / Linux (nvim, v0.9.1) (push) Has been cancelled
test / Linux (true, vim, v7.4.052) (push) Has been cancelled
test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
test / Linux (true, vim, v7.4.629) (push) Has been cancelled
test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
test / Linux (vim, nightly) (push) Has been cancelled
test / Linux (vim, v8.0.0184) (push) Has been cancelled
test / Linux (vim, v8.0.1453) (push) Has been cancelled
test / Linux (vim, v8.1.2269) (push) Has been cancelled
test / Linux (vim, v8.2.2434) (push) Has been cancelled
test / Linux (vim, v8.2.3995) (push) Has been cancelled
test / Windows (nvim, nightly) (push) Has been cancelled
test / Windows (nvim, v0.3.8) (push) Has been cancelled
test / Windows (nvim, v0.4.2) (push) Has been cancelled
test / Windows (nvim, v0.4.3) (push) Has been cancelled
test / Windows (nvim, v0.4.4) (push) Has been cancelled
test / Windows (nvim, v0.5.0) (push) Has been cancelled
test / Windows (nvim, v0.5.1) (push) Has been cancelled
test / Windows (nvim, v0.6.0) (push) Has been cancelled
test / Windows (nvim, v0.6.1) (push) Has been cancelled
test / Windows (nvim, v0.7.0) (push) Has been cancelled
test / Windows (nvim, v0.7.2) (push) Has been cancelled
test / Windows (nvim, v0.8.0) (push) Has been cancelled
test / Windows (nvim, v0.8.1) (push) Has been cancelled
test / Windows (nvim, v0.8.2) (push) Has been cancelled
test / Windows (nvim, v0.8.3) (push) Has been cancelled
test / Windows (nvim, v0.9.0) (push) Has been cancelled
test / Windows (nvim, v0.9.1) (push) Has been cancelled
test / Windows (vim, nightly) (push) Has been cancelled
test / Windows (vim, v7.4.1185) (push) Has been cancelled
test / Windows (vim, v7.4.1689) (push) Has been cancelled
test / Windows (vim, v8.0.0027) (push) Has been cancelled
test / Windows (vim, v8.0.1453) (push) Has been cancelled
test / Windows (vim, v8.1.2269) (push) Has been cancelled
test / Windows (vim, v8.2.2434) (push) Has been cancelled
test / Windows (vim, v8.2.3995) (push) Has been cancelled
docker / docker (push) Has been cancelled
mirror / check (coding) (push) Has been cancelled
mirror / check (gitee) (push) Has been cancelled
mirror / check (gitlab) (push) Has been cancelled
init
2024-08-21 14:17:26 +08:00

146 lines
4.9 KiB
VimL

"=============================================================================
" deoplete.vim --- deoplete default config in spacevim
" Copyright (c) 2016-2023 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg@outlook.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
let g:deoplete#enable_at_startup = get(g:, 'deoplete#enable_at_startup', 1)
" deoplete options
let s:profile = SpaceVim#layers#autocomplete#getprfile()
call deoplete#custom#option({
\ 'auto_complete_delay' : g:_spacevim_autocomplete_delay,
\ 'ignore_case' : get(g:, 'deoplete#enable_ignore_case', 1),
\ 'smart_case' : get(g:, 'deoplete#enable_smart_case', 1),
\ 'camel_case' : get(g:, 'deoplete#enable_camel_case', 1),
\ 'refresh_always' : get(g:, 'deoplete#enable_refresh_always', 1),
\ 'nofile_complete_filetypes' : ['denite-filter'],
\ })
if !SpaceVim#layers#lsp#check_filetype('java')
\ && !SpaceVim#layers#lsp#check_server('jdtls')
" java && jsp
call deoplete#custom#var('omni', 'input_patterns', {
\ 'java': [
\ '[^. \t0-9]\.\w*',
\ '[^. \t0-9]\->\w*',
\ '[^. \t0-9]\::\w*',
\ ],
\ 'jsp': ['[^. \t0-9]\.\w*'],
\})
if g:spacevim_enable_javacomplete2_py
call deoplete#custom#option('ignore_sources', {'java': ['omni']})
call deoplete#custom#source('javacomplete2', 'mark', '')
else
call deoplete#custom#option('ignore_sources', {'java': ['javacomplete2', 'around', 'member']})
call deoplete#custom#source('omni', 'mark', '')
call deoplete#custom#source('omni', 'rank', 9999)
endif
endif
" sh
call deoplete#custom#option('ignore_sources', {'sh': ['around', 'member', 'tag', 'syntax']})
" go
call deoplete#custom#option('ignore_sources', {'go': ['omni']})
call deoplete#custom#source('go', 'mark', '')
call deoplete#custom#source('go', 'rank', 9999)
" markdown
call deoplete#custom#option('ignore_sources', {'markdown': ['tag']})
" perl
call deoplete#custom#var('omni', 'input_patterns', {
\ 'perl': [
\ '[^. \t0-9]\.\w*',
\ '[^. \t0-9]\->\w*',
\ '[^. \t0-9]\::\w*',
\ ],
\})
" javascript
call deoplete#custom#option('ignore_sources', {'javascript': ['omni']})
call deoplete#custom#source('ternjs', 'mark', 'tern')
call deoplete#custom#source('ternjs', 'rank', 9999)
" typescript
call deoplete#custom#option('ignore_sources', {'typescript': ['tag','omni', 'syntax']})
call deoplete#custom#source('typescript', 'rank', 9999)
" php two types, 1. phpcd (default) 2. lsp
if SpaceVim#layers#lsp#check_filetype('php')
if has('nvim')
call deoplete#custom#option('ignore_sources', {'php': ['omni', 'around', 'member']})
else
call deoplete#custom#option('ignore_sources', {'php': ['around', 'member']})
endif
else
call deoplete#custom#option('ignore_sources', {'php': ['omni', 'around', 'member']})
endif
" gitcommit
call deoplete#custom#var('omni', 'input_patterns', {
\ 'git-commit': [
\ '[ ]#[ 0-9a-zA-Z]*',
\ ],
\})
call deoplete#custom#option('ignore_sources', {'gitcommit': ['neosnippet']})
" lua
call deoplete#custom#option('ignore_sources', {'lua': ['omni']})
" c c++
call deoplete#custom#source('clang2', 'mark', '')
call deoplete#custom#option('ignore_sources', {'c': ['omni']})
" rust
call deoplete#custom#option('ignore_sources', {'rust': ['omni']})
call deoplete#custom#source('racer', 'mark', '')
" vim
call deoplete#custom#option('ignore_sources', {'vim': ['tag']})
" denite
call deoplete#custom#option('ignore_sources', {'denite-filter': ['denite', 'buffer', 'around', 'member', 'neosnippet']})
" clojure
call deoplete#custom#option('keyword_patterns', {
\ 'clojure': '[\w!$%&*+/:<=>?@\^_~\-\.#]*',
\})
" ocaml
call deoplete#custom#option('ignore_sources', {'ocaml': ['buffer', 'around', 'omni']})
" erlang
call deoplete#custom#var('omni', 'input_patterns', {
\ 'erlang': [
\ '[^. \t0-9]\.\w*',
\ ],
\})
" c#
call deoplete#custom#option('sources', {'cs': ['omnisharp']})
" public settings
call deoplete#custom#source('_', 'matchers', ['matcher_full_fuzzy'])
call deoplete#custom#source('file/include', 'matchers', ['matcher_head'])
if !empty(g:_spacevim_key_sequence)
\ && g:_spacevim_key_sequence !=# 'nil'
\ && g:spacevim_escape_key_binding !=# g:_spacevim_key_sequence
exe printf('inoremap <silent><expr>%s deoplete#manual_complete()', g:_spacevim_key_sequence)
endif
if g:spacevim_autocomplete_parens && exists('g:loaded_delimitMate')
imap <expr><C-h> deoplete#smart_close_popup()."<Plug>delimitMateBS"
imap <expr><BS> deoplete#smart_close_popup()."<Plug>delimitMateBS"
else
inoremap <expr><C-h> deoplete#smart_close_popup()."\<C-h>"
inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>"
endif
set isfname-==
" vim:set et sw=2: