GithubHelp home page GithubHelp logo

technophobe01 / ddc.vim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shougo/ddc.vim

0.0 1.0 0.0 544 KB

Dark deno-powered completion framework for neovim/Vim8

License: MIT License

TypeScript 83.71% Makefile 0.36% Vim Script 15.93%

ddc.vim's Introduction

ddc.vim

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.

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.

Note: I have created Japanese article for ddc.vim. After that I have created the next article Japanese article for both ddc.vim and pum.vim recently. You can read them by translation service.

The development is supported by github sponsors. Thank you!

Introduction

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

Install

Note: Ddc.vim requires Neovim (0.8.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 UIs
"Plug 'Shougo/ddc-ui-native'

" Install your sources
"Plug 'Shougo/ddc-source-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 UIs
"call dein#add('Shougo/ddc-ui-native')

" Install your sources
"call dein#add('Shougo/ddc-source-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 UIs, sources and filters. You must install them which you want manually. You can search ddc plugins(sources and filters) from here.

Requirements

Ddc.vim requires both Deno and denops.vim.

Configuration

" Customize global settings

" You must set the default ui.
" Note: native ui
" https://github.com/Shougo/ddc-ui-native
call ddc#custom#patch_global('ui', 'native')

" Use around source.
" https://github.com/Shougo/ddc-source-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.

Screenshots

Please see: Shougo#32

nvim-lsp

command line completion

Plans

ddc.vim's People

Contributors

shougo avatar octaltree avatar lumakernel avatar matsui54 avatar lambdalisue avatar e-kwsm avatar milly avatar kuuote avatar thinca avatar ryota2357 avatar amadeus avatar haruyama avatar pusewicz avatar digital-carver avatar 110y avatar erw7 avatar hokorobi avatar ippachi avatar nat-chan avatar ujihisa avatar yasunori0418 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.