Note: It is still beta version. But it is almost stable.
Dark deno-powered completion framework for neovim/Vim8
If you don't want to configure plugins, you don't have to use the plugin. It does not work with zero configuration. You can use other plugins.
Please read help for details.
Ddc is the abbreviation of "dark deno-powered completion". It provides an extensible and asynchronous completion framework for neovim/Vim8.
I have created Japanese article for ddc.vim recently. You can read it by translation service.
The development is supported by github sponsors. Thank you!
I have chosen denops.vim framework to create new plugin. Because denops.vim is better than neovim Python interface.
- Easy to setup
- Minimal dependency
- Stability
- neovim/Vim8 compatibility
- Speed
- Library
- Easy to hack
Note: Ddc.vim requires Neovim (0.5.0+ and of course, latest is recommended) or Vim 8.2.0662. See requirements if you aren't sure whether you have this.
For vim-plug
call plug#begin()
Plug 'Shougo/ddc.vim'
Plug 'vim-denops/denops.vim'
" Install your sources
"Plug 'Shougo/ddc-around'
" Install your filters
"Plug 'Shougo/ddc-matcher_head'
"Plug 'Shougo/ddc-sorter_rank'
call plug#end()
For dein.vim
call dein#begin()
call dein#add('Shougo/ddc.vim')
call dein#add('vim-denops/denops.vim')
" Install your sources
"call dein#add('Shougo/ddc-around')
" Install your filters
"call dein#add('Shougo/ddc-matcher_head')
"call dein#add('Shougo/ddc-sorter_rank')
call dein#end()
Note: Ddc.vim does not include any sources and filters. You must install them you want manually. You can search ddc plugins(sources and filters) from here.
Ddc.vim requires both Deno and denops.vim.
" Customize global settings
" Use around source.
" https://github.com/Shougo/ddc-around
call ddc#custom#patch_global('sources', ['around'])
" Use matcher_head and sorter_rank.
" https://github.com/Shougo/ddc-matcher_head
" https://github.com/Shougo/ddc-sorter_rank
call ddc#custom#patch_global('sourceOptions', {
\ '_': {
\ 'matchers': ['matcher_head'],
\ 'sorters': ['sorter_rank']},
\ })
" Change source options
call ddc#custom#patch_global('sourceOptions', {
\ 'around': {'mark': 'A'},
\ })
call ddc#custom#patch_global('sourceParams', {
\ 'around': {'maxSize': 500},
\ })
" Customize settings on a filetype
call ddc#custom#patch_filetype(['c', 'cpp'], 'sources', ['around', 'clangd'])
call ddc#custom#patch_filetype(['c', 'cpp'], 'sourceOptions', {
\ 'clangd': {'mark': 'C'},
\ })
call ddc#custom#patch_filetype('markdown', 'sourceParams', {
\ 'around': {'maxSize': 100},
\ })
" Mappings
" <TAB>: completion.
inoremap <silent><expr> <TAB>
\ pumvisible() ? '<C-n>' :
\ (col('.') <= 1 <Bar><Bar> getline('.')[col('.') - 2] =~# '\s') ?
\ '<TAB>' : ddc#map#manual_complete()
" <S-TAB>: completion back.
inoremap <expr><S-TAB> pumvisible() ? '<C-p>' : '<C-h>'
" Use ddc.
call ddc#enable()
See :help ddc-options
for a complete list of options.
Please see: Shougo#32
- Custom ddc options support
- Custom source options support
- Implement source orders
- Implement sorter_rank
- virtual text completion mode
- Split sources and filters
- Implement LSP source
- Manual completion support
- Implement converter_remove_overlap
- iskeyword support
- Sources/Filters auto loading without registers
- Original popup window implementation
- Command line completion