deoplete
~ The dark powered auto completion plugin for neovim ~
Presented by Shougo
Introduction
● This slide is English for the foreign people● But the talk is Japanese for the Japanese
people● The slide may contain spiritual topic or
Chuunibyou( 厨二病 )● These are feature
Self-introduction
● Shougo● I am called as “ 暗黒美夢王” . ● Pronounces it “Uncock Vim Awe”.● Some people call me as “the sith lord of Vim
plugins”.● Text editor is all of my life● My previous works: neocomplete,
neobundle, neosnippet, unite, vimfiler, vimshell, etc...
Today's topic
● Deoplete plugin
https://github.com/Shougo/deoplete.nvim
● It is the first asynchronous completion plugin for neovim
● You don't have to be annoying the completion blocks!
● If you don't know about neovim, please read my previous presentation.
http://www.slideshare.net/Shougo/lets-talk-about-neovim
Why deoplete is created?
● My most concern is to block Vim in the completion
● if_lua is faster than VimL. But it also blocks● Tarruda(neovim founder) said
Wow!!Note: It is free translation
But
● The hell has been started from here...
Needed works (1/4)
● Python3 support– No if_lua support in neovim yet– I don't want to create new
Python2 plugin in 2015– I have added if_python3 feature
based on if_python2 in neovim– Thanks the neovim reviewers!
Needed works (2/4)
● complete() bug fix– It is needed for deoplete, but it is
not tested well– Thanks the vim-jp and neovim
reviewers!
Needed works (3/4)
● v:completed_item and completeopt patches– It is needed for auto completion
plugins– Thanks the vim-jp and neovim
reviewers!
Needed works (4/4)
● Understand remote plugin features– Less documentation– Less examples– Hard to debug
Deoplete original features (1/3)
● Asynchronous call omnifunc– But the omnifunc which move
cursors(side effect) is not supported
– For example: htmlcomplete– Synchronous call omnifunc is
also available like neocomplete
Deoplete original features (2/3)
● Python3 sources instead of VimL– You don't have to write VimL– You can wrap VimL functions in
the source
Deoplete original features (3/3)
● Better buffer source– You don't have to know the line is
cached if it is not large files– The lines are analyzed like built-in
buffer completion– You must wait to complete in
editing large files, but it is non blocking!
Sources
● Built-in– buffer, tag, file, omni, member,
dictionary● External
– Neco-ghc, neosnippet, neco-look, neco-vim, neco-syntax, vim-racer, vimshell
Installation
1.Clone Deoplete source$ git clone https://github.com/Shougo/deoplete.nvim
2.Install neovim$ git clone https://github.com/neovim/neovim
3.Install neovim-python3$ (sudo) pip3 install neovim
Demo
● Edit eval.c (22000 lines) with deoplete + neovim
● Edit eval.c (22000 lines) with neocomplete + Vim
● “Behold Vimmers, this is THE real asynchronous!”
FAQ (1)
● Is Deoplete is faster than neocomplete?● I think neocomplete is faster because of
if_lua power● The asynchronous is to skip the completion
if your input is too fast ● So, you should use deoplete in newer
machine
FAQ (2)
● Deoplete does support any of languages?● Deoplete can call omnifunc automatically● Or you can create the source for it● Why don't you create the source?● :help deoplete-create-source
In the future
● Deoplete version 1.0 will be released after the presentation!
● After version 1.0:– More customization– Improve file source behavior– Implement more features in neocomplete
● Rewrite unite.vim for neovim(VimConf2016 presentation)
Fin
● If you think “Deoplete is nice!”, please support neovim project by money or code.
https://salt.bountysource.com/teams/neovim https://github.com/neovim/neovim/issues
● Deoplete depends on the neovim's features!