Created
October 5, 2021 04:56
-
-
Save yuki-yano/d2197be559841d0aeaf91344fde60b54 to your computer and use it in GitHub Desktop.
coc + skkeleton + ddc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " ddc {{{3 | |
| if dein#tap('ddc.vim') | |
| function! SetupDdc() abort | |
| call ddc#enable() | |
| endfunction | |
| function DdcSettings() abort | |
| call ddc#custom#patch_global('autoCompleteEvents', ['InsertEnter', 'TextChangedI', 'TextChangedP']) | |
| call ddc#custom#patch_global('sources', ['skkeleton']) | |
| call ddc#custom#patch_global('sourceOptions', { | |
| \ 'skkeleton': { | |
| \ 'mark': 'skkeleton', | |
| \ 'matchers': ['skkeleton'], | |
| \ 'sorterts': [], | |
| \ }, | |
| \ }) | |
| endfunction | |
| function! EnableDdc() abort | |
| let b:coc_suggest_disable = v:true | |
| call DdcSettings() | |
| endfunction | |
| function! DisableDdc() abort | |
| let b:coc_suggest_disable = v:false | |
| call ddc#custom#patch_global('sourceOptions', {}) | |
| endfunction | |
| endif | |
| " }}}3 | |
| " skkeleton {{{3 | |
| if dein#tap('skkeleton') | |
| imap <C-j> <Plug>(skkeleton-toggle) | |
| cmap <C-j> <Plug>(skkeleton-toggle) | |
| function! SetupSkkeleton() abort | |
| call skkeleton#config({ | |
| \ 'globalJisyo': expand('~/.vim/skk/SKK-JISYO.L') | |
| \ }) | |
| endfunction | |
| AutoCmd User skkeleton-enable-pre call EnableDdc() | |
| AutoCmd User skkeleton-disable-pre call DisableDdc() | |
| endif | |
| " }}}3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment