Mozc input source for coc.nvim
MIT License
Mozc input method source for coc.nvim. It shows mozc suggestion to COC's completion list.
In terminal, it is hard to input Japanese with OS standard IME. With coc-mozc, you can input Japanese just like code suggestion.
mozc_emacs_helper
is required!
For ubuntu:
sudo apt-get install emacs-mozc
CocInstall
:CocInstall coc-mozc
" Selects the first prediction by pressing Enter, meaning insert ひらがな
autocmd User MozcEnabled execute('inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"')
autocmd User MozcDisabled execute('inoremap <cr> <cr>')
" C-j toggles mozc mode
inoremap <expr> <C-j> execute(':CocCommand mozc.toggle')
" Disable mozc when insert leave
au InsertLeave * execute(':CocCommand mozc.disable')
MIT
This extension is built with create-coc-extension