[[plugins]] repo = 'Shougo/ddc.vim' depends = ['context_filetype.vim', 'denops.vim', 'pum.vim'] on_event = 'InsertEnter' hook_source = ''' inoremap ddc#complete_common_string() call ddc#custom#patch_global( \ 'sources', has('nvim') ? \ ['around', 'deoppet', 'file'] : \ ['around', 'file'], \ ) call ddc#custom#patch_global('sourceOptions', { \ '_': { \ 'ignoreCase': v:true, \ 'matchers': ['matcher_head'], \ 'sorters': ['sorter_rank'], \ 'converters': ['converter_remove_overlap'], \ }, \ 'around': { \ 'mark': 'A', \ 'matchers': ['matcher_head', 'matcher_length'], \ }, \ 'eskk': {'mark': 'eskk', 'matchers': [], 'sorters': []}, \ 'necovim': {'mark': 'vim'}, \ 'deoppet': {'mark': 'dp', 'dup': v:true}, \ 'nextword': { \ 'mark': 'nextword', \ 'minAutoCompleteLength': 3, \ 'isVolatile': v:true, \ }, \ 'nvim-lsp': { \ 'mark': 'lsp', \ 'forceCompletionPattern': '\.\w*|:\w*|->\w*' \ }, \ 'rtags': { \ 'mark': 'R', \ 'forceCompletionPattern': '\.\w*|:\w*|->\w*' \ }, \ 'file': { \ 'mark': 'F', \ 'isVolatile': v:true, \ 'minAutoCompleteLength': 1000, \ 'forceCompletionPattern': '\S/\S*' \ }, \ 'cmdline-history': {'mark': 'history'}, \ 'shell-history': {'mark': 'shell'}, \ 'zsh': { \ 'mark': 'zsh', \ 'isVolatile': v:true, \ 'forceCompletionPattern': '\S/\S*' \ } \ }) call ddc#custom#patch_global('sourceOptions', { \ 'skkeleton': { \ 'mark': 'skk', \ 'matchers': ['skkeleton'], \ 'sorters': [], \ 'minAutoCompleteLength': 2, \ }}) call ddc#custom#patch_filetype( \ ['help', 'markdown', 'gitcommit'], 'sources', has('nvim') ? \ ['deoppet', 'nextword', 'around'] : \ ['nextword', 'around'] \ ) call ddc#custom#patch_filetype( \ ['typescript', 'go'], 'sources', has('nvim') ? \ ['nvim-lsp', 'deoppet', 'around'] : \ ['nvim-lsp', 'around'] \ ) call ddc#custom#patch_filetype(['deol'], { \ 'keywordPattern': '[[:alnum:]_./-]', \ 'sources': ['zsh', 'shell-history', 'around'], \ }) " Use pum.vim call ddc#custom#patch_global('autoCompleteEvents', [ \ 'InsertEnter', 'TextChangedI', 'TextChangedP', \ 'CmdlineEnter', 'CmdlineChanged', \ ]) call ddc#custom#patch_global('completionMenu', 'pum.vim') inoremap \ pum#visible() ? 'call pum#map#insert_relative(+1)' : \ (col('.') <= 1 getline('.')[col('.') - 2] =~# '\s') ? \ '' : ddc#manual_complete() inoremap call pum#map#insert_relative(-1) inoremap call pum#map#select_relative(+1) inoremap call pum#map#select_relative(-1) inoremap call pum#map#confirm() inoremap call pum#map#cancel() call ddc#enable() ''' hook_add = ''' nnoremap : call CommandlinePre(): function! CommandlinePre() abort call dein#source('ddc.vim') " Note: It disables default command line completion! cnoremap \ pum#visible() ? 'call pum#map#insert_relative(+1)' : \ ddc#manual_complete() cnoremap call pum#map#insert_relative(-1) cnoremap call pum#map#confirm() cnoremap call pum#map#cancel() " Overwrite sources let s:prev_buffer_config = ddc#custom#get_buffer() call ddc#custom#patch_buffer('sources', \ ['necovim', 'cmdline-history', 'around']) autocmd MyAutoCmd CmdlineLeave * ++once call CommandlinePost() " Enable command line completion call ddc#enable_cmdline_completion() call ddc#enable() endfunction function! CommandlinePost() abort " Restore sources call ddc#custom#set_buffer(s:prev_buffer_config) cunmap endfunction ''' [[plugins]] repo = 'Shougo/pum.vim' [[plugins]] repo = 'Shougo/ddc-around' on_source = 'ddc.vim' [[plugins]] repo = 'Shougo/ddc-nextword' on_source = 'ddc.vim' [[plugins]] repo = 'Shougo/ddc-zsh' on_source = 'ddc.vim' depends = 'ddc.vim' [[plugins]] repo = 'Shougo/neco-vim' on_source = 'ddc.vim' hook_source = ''' call ddc#custom#patch_filetype( \ ['vim'], 'sources', has('nvim') ? \ ['necovim', 'around', 'deoppet', 'file'] : \ ['necovim', 'around', 'file'] \ ) ''' [[plugins]] repo = 'Shougo/ddc-nvim-lsp' on_source = 'nvim-lspconfig' [[plugins]] repo = 'Shougo/ddc-matcher_head' on_source = 'ddc.vim' [[plugins]] repo = 'Shougo/ddc-matcher_length' on_source = 'ddc.vim' [[plugins]] repo = 'Shougo/ddc-sorter_rank' on_source = 'ddc.vim' [[plugins]] repo = 'Shougo/ddc-cmdline-history' on_source = 'ddc.vim' [[plugins]] repo = 'Shougo/ddc-converter_remove_overlap' on_source = 'ddc.vim' [[plugins]] repo = 'neovim/nvim-lspconfig' depends = 'impatient.nvim' on_ft = ['typescript', 'go'] if = 'has("nvim")' depends = 'ddc.vim' hook_source = ''' lua << EOF require'lspconfig'.denols.setup{} require'lspconfig'.gopls.setup{} EOF ''' [[plugins]] repo = 'LumaKernel/ddc-file' on_source = 'ddc.vim' [[plugins]] repo = 'Shougo/ddc-omni' [[plugins]] repo = 'Shougo/ddc-rtags' on_ft = ['c', 'cpp'] [[plugins]] repo = 'vim-skk/skkeleton' on_map = {ic = '(skkeleton-toggle)'} depends = ['ddc.vim'] hook_add = ''' imap (skkeleton-toggle) cmap (skkeleton-toggle) ''' hook_source = ''' "let g:skkeleton#debug = v:true call skkeleton#config({ \ 'globalJisyo': has('win32') ? \ '~/.config/SKK-JISYO.L' : '/usr/share/skk/SKK-JISYO.L', \ 'eggLikeNewline': v:true, \ 'registerConvertResult': v:true, \ }) if &term !=# 'gui' && &term !=# 'nvim' && &term !~# '^xterm' call skkeleton#config({ \ 'markerHenkan': '<>', \ 'markerHenkanSelect': '>>', \ }) endif call skkeleton#register_kanatable('rom', { \ 'jj': 'escape', \ '~': ['〜', ''], \ "z\": ["\u3000", ''], \ }) autocmd MyAutoCmd User skkeleton-enable-pre call s:skkeleton_pre() function! s:skkeleton_pre() abort " Overwrite sources let s:prev_buffer_config = ddc#custom#get_buffer() call ddc#custom#patch_buffer('sources', ['skkeleton']) endfunction autocmd MyAutoCmd User skkeleton-disable-pre call s:skkeleton_post() function! s:skkeleton_post() abort " Restore sources call ddc#custom#set_buffer(s:prev_buffer_config) endfunction let &g:titlestring = " \ %(%m%r%w%)%{skkeleton#mode().expand('%:p:~:.')} \ %<\(%{fnamemodify(getcwd(), ':~')}\)" ''' #[[plugins]] #repo = 'matsui54/denops-popup-preview.vim' #on_source = 'ddc.vim' #hook_source = ''' #call popup_preview#enable() #'''