Skip to content

octaltree/ddc.vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ddc.vim

Note: It is alpha version!! You can test it.

Dark deno powered completion framework for neovim/Vim8

Doc

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.

ddc will display completions via complete() by default.

Introduction

I have chosen denops.vim framework to create new auto completion plugin. Because denops.vim is better than neovim Python interface.

  • Easy to setup
  • Minimal dependency
  • Stability
  • neovim/Vim8 compatibility
  • Speed
  • Library
  • Easy to hack

Install

Note: ddc requires Neovim (0.5.0+ and of course, latest is recommended) or Vim8.2. 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'

call plug#end()

For dein.vim

call dein#begin()

call dein#add('Shougo/ddc.vim')
call dein#add('vim-denops/denops.vim')

call dein#end()

Requirements

ddc requires both Deno and denops.vim.

Configuration

" 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},
      \ })

" Use ddc.
call ddc#enable()

See :help ddc-options for a complete list of options.

Screenshots

Plans

  • 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
  • iskeyword support
  • Manual completion support

About

Dark deno powered completion framework for neovim/Vim8

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 77.9%
  • Vim Script 21.3%
  • Makefile 0.8%