Giter Site home page Giter Site logo

deoplete.nvim's Introduction

deoplete.nvim

Dark powered asynchronous completion framework for neovim/Vim8

Note: The development of this plugin is finished. Accepts minor patches and issues but no new features. ddc.vim is the next generation auto completion plugin. Consider migrating to it.

Join the chat at https://gitter.im/Shougo/deoplete.nvim Doc

Please read help for details.

Note: If you need to understand what's different between deoplete and other similar plugins, please read "deoplete-faq" section in the documentation.

Deoplete is the abbreviation of "dark powered neo-completion". It provides an extensible and asynchronous completion framework for neovim/Vim8.

deoplete will display completions via complete() by default.

Here are some completion sources specifically made for deoplete.nvim.

Install

Note: deoplete requires Neovim (0.3.0+ and of course, latest is recommended) or Vim8.2.1978+ with Python 3.6.1+ and timers enabled. See requirements if you aren't sure whether you have this.

Note: deoplete requires msgpack package 1.0.0+. Please install/upgrade msgpack package by pip. https://github.com/msgpack/msgpack-python

Note: If you really need to use older msgpack, please use deoplete ver.5.2 instead.

https://github.com/Shougo/deoplete.nvim/releases/tag/5.2

For vim-plug

if has('nvim')
  Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
  Plug 'Shougo/deoplete.nvim'
  Plug 'roxma/nvim-yarp'
  Plug 'roxma/vim-hug-neovim-rpc'
endif
let g:deoplete#enable_at_startup = 1

For dein.vim

call dein#add('Shougo/deoplete.nvim')
if !has('nvim')
  call dein#add('roxma/nvim-yarp')
  call dein#add('roxma/vim-hug-neovim-rpc')
endif
let g:deoplete#enable_at_startup = 1

Vim >= 8 built-in package manager (not recommended)

  1. Clone the repo in a package (e.g. $XDG_CONFIG_HOME/nvim/pack/dist/start, where dist is the name of the package)

  2. Write call deoplete#enable() or let g:deoplete#enable_at_startup = 1 in your init.vim

  3. Inside NeoVim, call :UpdateRemotePlugins

Requirements

deoplete requires Neovim or Vim8 with if_python3.

If :echo has("python3") returns 1, then you have python 3 support; otherwise, see below.

You can enable Python3 interface with pip:

pip3 install --user pynvim

Please install nvim-yarp and vim-hug-neovim-rpc for Vim8.

Note: Python3 must be enabled before updating remote plugins

If Deoplete was installed prior to Python support being added to Neovim, :UpdateRemotePlugins should be executed manually in order to enable auto-completion.

Note: deoplete needs pynvim ver.0.3.0+.

You need update pynvim module.

pip3 install --user --upgrade pynvim

If you want to read the Neovim-python/python3 interface install documentation, you should read :help provider-python and the Wiki. https://github.com/deoplete-plugins/deoplete-jedi/wiki/Setting-up-Python-for-Neovim

Configuration

" Use deoplete.
let g:deoplete#enable_at_startup = 1

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

Screenshots

Deoplete for JavaScript https://www.youtube.com/watch?v=oanoPTpiSF4

File Name Completion

Omni Completion

Neosnippets and neco-ghc integration

deoplete + echodoc integration

deoplete + deoplete-go integration

deoplete + deoplete-typescript integration

Python completion using deoplete-jedi

C++ completion using clang_complete

Java completion using vim-javacomplete2

Vim Script completion using neco-vim

C# completion using deoplete-omnisharp

Register/Extract list completions

FSharp completion using deopletefs

Typescript

Javascript

Css, scss, sass

Html

My custom snippets

C++ with cquery lang server

Rust using rls

Ruby dictionary completion

LanguageClient-neovim integration

deoplete.nvim's People

Contributors

alok avatar balta2ar avatar blueyed avatar brooth avatar callmekohei avatar e-kwsm avatar fgrsnau avatar fmoralesc avatar fszymanski avatar h-michael avatar hamled avatar hnykda avatar hrsh7th avatar milly avatar mindtooth avatar nhooyr avatar resolritter avatar ryosusami avatar shotat avatar shougo avatar thalesmello avatar tjdevries avatar tweekmonster avatar ujihisa avatar vitaly avatar wokalski avatar wsdjeg avatar yangbeom avatar zchee avatar zefei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deoplete.nvim's Issues

Popup doesn't show up automatically when typing

I'm trying to recreate my current Vim setup in Neovim

In vim I'm using Neocomplete with these settings

    let g:neocomplete#enable_at_startup = 1
    let g:neocomplete#enable_smart_case = 1
    let g:neocomplete#sources#syntax#min_keyword_length = 3
    let g:neocomplete#auto_completion_start_length = 1
    let g:neocomplete#sources#buffer#cache_limit_size = 50000
    let g:neocomplete#data_directory = $HOME.'/.vim/cache/noecompl'
    let g:neocomplete#sources#syntax#min_keyword_length = 3
    let g:neocomplete#force_omni_input_patterns = get(g:, 'neocomplete#force_omni_input_patterns', {})
    let g:neocomplete#force_omni_input_patterns.javascript = '[^. \t]\.\w*'
    " Tab completion.
    inoremap <expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"

and in Neovim I have this right now

    let g:deoplete#enable_at_startup = 1
    let g:deoplete#auto_completion_start_length = 1
    let g:deoplete#enable_smart_case = 1
    let g:deoplete#enable_auto_close_preview = 1
    let g:deoplete#data_directory = $HOME.'.vim/cache/deoplete'
    let g:deoplete#force_omni_input_patterns = get(g:, 'deoplete#force_omni_input_patterns', {})
    let g:deoplete#force_omni_input_patterns.javascript = '[^. \t]\.\w*'
    inoremap <expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"
  1. The autocomplete popup doesn't show automatically while typing in deoplete unlike neocomplete.
  2. How can use TAB to match the behaviour of neocomplete?

probleme omni_patterns

shugo when i use :
let g:deoplete#omni_patterns.go = '[^.[:digit:] _\t].\w_'

deoplete autocompletion dosen't work

Neovim becomes very slow/hang when editing Ruby and Java files

I notice that when I'm editing Ruby or Java source code, it becomes very slow/hang every time I change from normal mode to insert mode and start typing something. I tried to set let g:deoplete#disable_auto_complete = 1 but it doesn't help. By the way, it's normal when editing markdown or normal txt file (non syntax files).

My .nvimrc setting for deoplete:

" Use deoplete.
let g:deoplete#enable_at_startup = 1
" Use smartcase.
let g:deoplete#enable_smart_case = 1

let g:deoplete#disable_auto_complete = 1

inoremap <expr><C-y>  deoplete#mappings#close_popup()
inoremap <expr><C-e>  deoplete#mappings#cancel_popup()

" <C-h>, <BS>: close popup and delete backword char.
inoremap <expr><C-h> deolete#mappings#smart_close_popup()."\<C-h>"
inoremap <expr><BS> deoplete#mappings#smart_close_popup()."\<C-h>"
set completeopt+=noinsert
if has("patch-7.4.314")
  set shortmess+=c
endif

Duplicate help tags

Not a huge bug, but getting this error message with the latest update.

[neobundle] Error generating helptags:
[neobundle] Vim(helptags):E154: Duplicate tag "b:deoplete_omni_patterns" in file /Users/mhartington/.nvim/bundle/.neobundle/doc/deoplete.txt

Obscure error - Not sure what to report

Occasionally I'll get this error

screen shot 2015-08-20 at 1 26 18 pm

With :DeopleteMessages showing this for the output.

Error detected while processing function remote#define#CommandBootstrap:
line    5:
NvimError(b'Vim(edit):E37: No write since last change (add ! to override)',)
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/site-packages/neovim/msgpack_rpc/session.py", line 177, in handler
    rv = self._request_cb(name, args)
  File "/usr/local/lib/python3.4/site-packages/neovim/api/common.py", line 237, in filter_request_cb
    walk(self._in, args, self, name, 'request'))
  File "/usr/local/lib/python3.4/site-packages/neovim/plugin/host.py", line 65, in _on_request
    rv = handler(*args)
  File "/usr/local/lib/python3.4/site-packages/neovim/plugin/host.py", line 141, in <lambda>
    decoder = lambda fn, hook, *args: fn(*hook.walk(args))
  File "/Users/mhartington/.nvim/bundle/deoplete.nvim/rplugin/python3/deoplete/__init__.py", line 59, in print_error
    self.vim.command('edit ' + self.msgfile)
neovim.api.nvim.NvimError: b'Vim(edit):E37: No write since last change (add ! to override)'
E171: Missing :endif

Neovim info:

NVIM 0.0.0-alpha+201508201245 (compiled Aug 20 2015 13:32:12)
Commit: f253c8d9b4ab0b31ce0d9a6a1b60428785d93d50
Build type: RelWithDebInfo
Compilation: /usr/local/Library/ENV/4.3/clang -Wconversion -O2 -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim201
50820-24077-tn0tiq/build/config -I/tmp/neovim20150820-24077-tn0tiq/src -I/tmp/neovim20150820-24077-tn0tiq/deps-build/usr/include -I/tmp/neovim20150820-24077-tn0tiq/deps-build/usr/include -I/tmp/neovim20150820
-24077-tn0tiq/deps-build/usr/include/luajit-2.0 -I/tmp/neovim20150820-24077-tn0tiq/deps-build/usr/include -I/tmp/neovim20150820-24077-tn0tiq/deps-build/usr/include -I/tmp/neovim20150820-24077-tn0tiq/deps-buil
d/usr/include -I/tmp/neovim20150820-24077-tn0tiq/deps-build/usr/include -I/usr/local/opt/gettext/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/u
sr/include -I/tmp/neovim20150820-24077-tn0tiq/build/src/nvim/auto -I/tmp/neovim20150820-24077-tn0tiq/build/include
Compiled by [email protected]

Optional features included (+) or not (-): +acl   +iconv    +jemalloc
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/nvimrc"
     user vimrc file: "~/.nvimrc"
 2nd user vimrc file: "~/.nvim/nvimrc"
      user exrc file: "~/.exrc"
  fall-back for $VIM: "/usr/local/Cellar/neovim/HEAD/share/nvim"

OSX

What other information do you need from me?

Weird error message

Error detected while processing function 168_on_cursor_moved..32: line 9: E684: list index out of range: 0 Error detected while processing function 168_on_cursor_moved..32: line 9: E15: Invalid expression: (has_key(item, 'abbr') && item.word !=# item.abbr) ? item.abbr : split(item.info, '\n')[0] Error detected while processing function 168_on_cursor_moved..32: line 11: E121: Undefined variable: abbr Error detected while processing function 168_on_cursor_moved..32: line 11: E15: Invalid expression: has_key(item, 'abbr') && abbr ==# item.abbr && len(get(item, 'menu', '')) > 5 Error detected while processing function 168_on_cursor_moved..32: line 18: E121: Undefined variable: abbr Error detected while processing function 168_on_cursor_moved..32: line 18: E116: Invalid arguments for function len(abbr) < len(item.word) + 2 Error detected while processing function 168_on_cursor_moved..32: line 18: E15: Invalid expression: len(abbr) < len(item.word) + 2 Error detected while processing function 168_on_cursor_moved..32: line 22: E121: Undefined variable: abbr Error detected while processing function 168_on_cursor_moved..32: line 22: E116: Invalid arguments for function stridx(abbr, item.word) Error detected while processing function 168_on_cursor_moved..32: line 22: E15: Invalid expression: stridx(abbr, item.word) Error detected while processing function 168_on_cursor_moved..32: line 23: E121: Undefined variable: match Error detected while processing function 168_on_cursor_moved..32: line 23: E15: Invalid expression: match >= 0 Error detected while processing function 168_on_cursor_moved..32: line 28: E121: Undefined variable: abbr -- More --

[Consult] Odd behaviour

Hi, everyone,

I just replaced neocomplcache with deoplete. I know that deoplete is still in alfa and is not aimed to production yet but I'm experiencing some odd behavior and I would like to ensure it is not caused by a wrong configuration from my side. The following is my current configuration:

" Use deoplete.
let g:deoplete#enable_at_startup = 1

" Not ignore the upper- and lower-case
let g:deoplete#enable_ignore_case = 1

" Define keyword
if !exists('g:deoplete#keyword_patterns')
    let g:deoplete#keyword_patterns = {}
endif

let g:deoplete#keyword_patterns.default = '[a-zA-Z_]\w{2,}?'
let g:deoplete#keyword_patterns.groovy = '[a-zA-Z_$]\w{2,}?'

" <CR>: close popup and save indent
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>

function! s:my_cr_function()
  return pumvisible() ? deoplete#mappings#close_popup() : "\<CR>"
endfunction

" <TAB>: completion
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"

" Close popup by <Space>
inoremap <expr><Space> pumvisible() ? deoplete#mappings#close_popup() : "\<Space>"

" Enable omni-completion
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS

autocmd FileType html,html.handlebars,markdown setlocal omnifunc=htmlcomplete#CompleteTags

autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS

autocmd FileType python setlocal omnifunc=pythoncomplete#Complete

autocmd FileType r setlocal omnifunc=CompleteR

" omnifunc-completion patterns
if !exists('g:deoplete#omni_patterns')
  let g:deoplete#omni_patterns = {}
endif

let g:deoplete#omni_patterns.groovy = '[^.\s*\t]\.\w*?'

let g:deoplete#omni_patterns.java = '[^.\s*\t]\.\w*?'

let g:deoplete#omni_patterns.r = '[a-zA-Z_]\w*?'

" Define ctags' arguments
let g:deoplete#ctags_arguments_list = {
\    'python': '--python-kinds=-i -o .vimtags',
\}

The mentioned odd behavior is hard to explain, I'll record a video if necessary.

Thanks for your time in advance.

Delay / Manually trigger completions

First of all, many thanks for this awesome project.

I know this project is very young but I was wondering if it is possible to delay the popup with completions or make it so you have to manually trigger this. Having the completions popup instantly for every word you're typing can be annoying/distracting.

This is pretty much the only thing stopping me from using deoplete full-time; I understand if this is not yet implemented though.

Failed to load python host

Today I updated deoplete.vim and I'm getting this error on python files:

Vim(if):Channel was closed by the client
Error detected while processing function deoplete#init#enable..remote#define#CommandBootstrap..remote#host#Require..<SNR>32_RequirePythonHost:
line   21:
E605: Exception not caught: Failed to load Python host. You can try to see what happened by starting Neovim with the environment variable $NVIM_PYTHON_LOG_FILE set to a file and ope
ning the generated log file. Also, the host stderr will be available in Neovim log, so it may contain useful information. See also ~/.nvimlog.

~/.nvimlog

2015/08/14 18:23:11 [info @ main_loop:558] 3477 - Starting Neovim main loop.
2015/08/14 18:23:20 [error @ forward_stderr:338] 3477 - Channel 2 stderr: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.4/site-packages/neovim/__init__.py", line 66, in start_host
    host.start(plugins)
  File "/usr/local/lib/python3.4/site-packages/neovim/plugin/host.
2015/08/14 18:23:20 [error @ forward_stderr:338] 3477 - Channel 2 stderr: py", line 47, in start
    lambda: self._load(plugins))
  File "/usr/local/lib/python3.4/site-packages/neovim/api/common.py", line 244, in run
    self._session.run(filter_request_cb, filter_notification_cb, setup_cb)
  File "/usr/local/lib/python3.4/site
2015/08/14 18:23:20 [error @ forward_stderr:338] 3477 - Channel 2 stderr: -packages/neovim/msgpack_rpc/session.py", line 118, in run
    raise self._setup_exception
  File "/usr/local/lib/python3.4/site-packages/neovim/msgpack_rpc/session.py", line 106, in on_setup
    setup_cb()
  File "/usr/local/lib/python3.4/site-packages/n
2015/08/14 18:23:20 [error @ forward_stderr:338] 3477 - Channel 2 stderr: eovim/plugin/host.py", line 47, in <lambda>
    lambda: self._load(plugins))
  File "/usr/local/lib/python3.4/site-packages/neovim/plugin/host.py", line 87, in _load
    file, pathname, description = find_module(name, [directory])
  File "/usr/local/lib/p
2015/08/14 18:23:20 [error @ forward_stderr:338] 3477 - Channel 2 stderr: ython3.4/site-packages/neovim/compat.py", line 29, in find_module
    return original_find_module(fullname, path)
  File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/imp.py", line 297, in find_module
    raise
2015/08/14 18:23:20 [error @ forward_stderr:338] 3477 - Channel 2 stderr: ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'deoplete'

2015/08/14 18:23:20 [error @ call_set_error:748] 3477 - msgpack-rpc: Channel was closed by the client

Is it a problem with deoplete or something else entirely? Thanks for the help.

How to turn off suggestions in comment?

Hi,

I'm working on a cpp file, and when I'm typing a comment, I see suggestions. Is there a way to turn off suggestions when I'm typing in a comment block?

Infinite loop

Inside HTML tags when fails to complete, deoplete goes in a infinite loop keep printing "Pattern not found" and raising CPU high.(only in INSERT MODE)

Preview on completion do not shows correctly with tern_for_vim

In the preview window, '\n' shows up directory instead of new line.

I don't know how neovim/vim shows up preview, but in tern#PreviewInfo tern_for_vim uses split('\n') , this may causes the problem.

Expected

2015-10-19 14 45 43
(obtained by <C-x><C-o>)

Observed

2015-10-19 14 45 15

Environment

OS: Mac OS X 10.10.4
Neovim version: 0.0.0-alpha+201510120701

minimal nvimrc

if has('vim_starting')
  set runtimepath-=~/.vim
  set runtimepath^=~/vim-test/vim
  set runtimepath^=~/vim-test/vim/bundle/neobundle.vim
endif

let s:neobundle_dir = expand('~/vim-test/vim/bundle')

let g:neobundle#types#git#default_protocol = 'https'

call neobundle#begin(s:neobundle_dir)

NeoBundleFetch 'Shougo/neobundle.vim'

NeoBundle 'Shougo/deoplete.nvim'

NeoBundle 'marijnh/tern_for_vim', {
      \ 'build' : {
      \   'mac' : 'npm install'
      \ }}

filetype plugin indent on

call neobundle#end()

let g:deoplete#enable_at_startup = 1

Reproduce ways

  1. nvim -u minimal.vimrc
  2. setf javascript
  3. input below:
var a = 10;
a.
  1. deoplete.nvim shows preview including '\n'
  2. <C-x><C-o> shows preview including break line instead of '\n'

Python error with neco-ghc

Problem summary

With filetype=haskell typing a bad module name and then . throws an error in Deoplete

Expected

No completions are offered

Environment Information

  • OS: Ubuntu 15.04
  • Neovim version: a3f048e compiled with nix

Minimal nvimrc

set rtp+=~/.nvim/plugged/deoplete.nvim/
set rtp+=~/.nvim/plugged/neco-ghc/

let g:deoplete#enable_at_startup = 1

Reproducable ways from Neovim starting

  1. Start neovim with the minimal vimrc
  2. Set filetype to haskell
  3. Enter insert mode and type a .
  4. Observe that deoplete has sent an error to messsages

Screen shot

One better: https://asciinema.org/a/2e5roz7j4yw2gaizaqqccs1yp

Log file

http://paste.ubuntu.com/12794160/

Very strange behavior with periods _not at beginning of line_ in python files.

Environment: Arch Linux x64
Neovim version: 0.r3836.90ef218-1

Minimal nvimrc testing with:

" -- https://github.com/junegunn/vim-plug -- "
call plug#begin()
Plug 'Shougo/deoplete.nvim'
call plug#end()

" Use deoplete.
let g:deoplete#enable_at_startup = 1

[If you believe the plugin system is the problem, let me know, and I'll try without. However, I wouldn't think it would be.]

Example steps to reproduce:

  1. $ nvim test.py
  2. Go to insert mode and insert a period. Notice that nothing changes.
  3. Go to the next line, and type any character (e.g. a), then type a period ..

Error appearing at bottom:

Error: Required vim compiled with +python
E117: Unknown function: pythoncomplete#Complete

Log file: https://gist.github.com/genkimarshall/307ee21ddbd5c38ac7fd

After ignoring and continuing, I notice it only ever reappears if in normal mode, you press a while your cursor is on a period not at the beginning of the line, or you press A while your cursor is on a line in which a period is not at the beginning of the line.

EDIT: I notice it also happens if you press i in normal mode when your character is on the same line as, but to the right of, a period that is not at the beginning of the line.

I don't find this error appearing in any other situation. Even in non-python files this error does not happen. I know this is very strange, I almost feel embarassed to post it because it is so weird that I feel I must be doing something wrong. Please let me know if you cannot reproduce and I will keep trying or ignore it.

Thanks for your time.

Utf-8 error "invalid continuation byte" when there's a tags file in the directory

I'm getting the following error when I've got a tags file in my folder:

Traceback (most recent call last):
  File "/Users/marlun/.nvim/bundle/deoplete.nvim/rplugin/python3/deoplete/__init__.py", line 78, in completion_begin
    candidates = self.deoplete.gather_candidates(context)
  File "/Users/marlun/.nvim/bundle/deoplete.nvim/rplugin/python3/deoplete/deoplete.py", line 99, in gather_candidates
    self.vim, context)
  File "/Users/marlun/.nvim/bundle/deoplete.nvim/rplugin/python3/deoplete/sources/tag.py", line 42, in gather_candidates
    for l in tags_file.readlines():
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/codecs.py", line 319, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 6493: invalid continuation byte

I've updated and compiled latest neovim and deoplete and I've run UpdateRemotePlugins.

If I remove my tags file and disable https://github.com/ludovicchabant/vim-gutentags (which otherwise will regenerate it) everything is working fine.

If I have gutentags installed and enabled and it regenerates the tags file, as soon as it's done I get the error message above (multiple times).

OS: OS X Yosemite 10.10.3
Neovim commit: 7b87dc9299993003ea9cd2e0f0f38b881010501d

enable_at_startup seems to be ignored

I have set let g:deoplete#enable_at_startup = 1 nvim configurations, but for some reason this setting seems to be ignored. I checked also if this setting has loaded and seems ok

let g:deoplete#enable_at_startup  => g:deoplete#enable_at_startup #1

If i enabled manualy with DeopleteEnable, the plugin is working.

Detecting Backslashes

I'm noticing some odd behavior in connection with backslashes. The following settings:

let g:deoplete#keyword_patterns = {}
let g:deoplete#keyword_patterns.tex = '[^\w|\s][a-zA-Z_]\w*'

will gather the keywords #test and @test, but not \test. The keyword pattern in the docs,

let g:deoplete#keyword_patterns.tex = '\\?[a-zA-Z_]\w*'

seems to have a similar issue. It gathers alpha but not \alpha, when I take it that this regex should match both.

Deoplete inserts characters and jumps randomly

The cursor jumps randomly on fast input. Sometimes the inserted characters are not deleted when undoing. When I press :q to quit, neovim does not warn me about unsaved changes (Strange!!). This happens with the keys that start insert mode e.g.: a,i, etc

Description of the screenshot:

  • Notice that the cursor jumped to the middle of typed iiiii's the first time I began typing. Later, I did an undo and began typing iii again.
  • This time it jumped to the *head and doing an undo did not delete the inserted characters. However, the + sign in the status bar disappeared, indicating that there are no changes.
  • Executing an :e! shows that the file on disk is different from what is shown in the window.

OS Environment:

OS X 10.10.5
iTerm 2 nightlies

nvim version:

NVIM 0.0.0-alpha+201509190915 (compiled Sep 20 2015 19:25:58)
Commit: 2417aeebbffe58eab6ac39feac0f64a27aafbee2
Build type: RelWithDebInfo

Minimal nvimrc:

call plug#begin('~/.nvim/plugged')
  Plug 'Shougo/deoplete.nvim'
  let g:deoplete#enable_at_startup = 1
call plug#end()

HTML used in the screenshot:

<!DOCTYPE html>
<html lang="en">
  <head>
 </head>
 <body>
     <div id="">
 </body>
</html>

Errors with Python 3

Getting some errors in the latest release.

Error detected while processing function deoplete#init#enable..remote#define#CommandBootstrap:
line    5:
Exception('no request handler registered for "/Users/mhartington/.nvim/bundle/deoplete.nvim/rplugin/python3/deoplete.py:command:DeopleteInitializePython"',)
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/neovim/msgpack_rpc/session.py", line 177, in handler
    rv = self._request_cb(name, args)
  File "/usr/local/lib/python3.5/site-packages/neovim/api/common.py", line 237, in filter_request_cb
    walk(self._in, args, self, name, 'request'))
  File "/usr/local/lib/python3.5/site-packages/neovim/plugin/host.py", line 62, in _on_request
    raise Exception(msg)
Exception: no request handler registered for "/Users/mhartington/.nvim/bundle/deoplete.nvim/rplugin/python3/deoplete.py:command:DeopleteInitializePython"
Error detected while processing function deoplete#init#enable..remote#define#CommandBootstrap:
line    5:
Error detected while processing function <SNR>261_completion_begin:
line    1:
E121: Undefined variable: g:deoplete#_channel_id
Error detected while processing function <SNR>261_completion_begin:
line    1:
E116: Invalid arguments for function rpcnotify

What more information do you need from me

Space Removed Before Word to Complete

Hello.
Sometimes, after I choose a completion, the space before the word to complete is removed.

Here are the steps to reproduce this issue:

  • Open a C file with nvim: nvim test.c.
  • Type the following code:
int main() {
    // TODO: ajouter des spin_lock dans toutes les méthodes publiques du buffer et pour ma
  • Trigger the completion with ctrl-n and accept the choice main.

The resulting code is:

int main() {
    // TODO: ajouter des spin_lock dans toutes les méthodes publiques du buffer et pourmain

The expected code is:

int main() {
    // TODO: ajouter des spin_lock dans toutes les méthodes publiques du buffer et pour main

(notice the space before main)

My config is:

let g:deoplete#enable_at_startup = 1

Thanks to fix this issue.

Error on entering Insert mode

I don't know whether I should report this error here or on neovim. However, you are the maintainer of the python3 on neovim too :)

I have a heavily configured nvimrc. If I start nvim normally I get the following error every time I get into insert mode. However, if I start with nvim -u nvimrc_other I don't get any errors, knowing that both of nvimrc and nvimrc_other has the same content.

Error detected while processing InsertEnter Auto commands for "*":
E121: Undefined variable: g:deoplete#_channel_id

deoplete creates ..nvimrc-rplugin~ file in home folder

I guess deoplete uses Neovim's remote plugin functionality, and doing so places a ..nvimrc-rplugin~ file in my home folder. I already have a folder structure for nvim in ~/.nvim with ~/.nvim/tmp for temp files. How can I tell deoplete to place the ..nvimrc-rplugin~ in my Neovim working folder? Thanks.

文字入力時にCPU使用率が異常に上昇する

_既存のファイル_を編集するとき、入力中に適当なタイミングでCPU使用率が異常に上昇します。新規にファイルを作成して編集するときには起きません。
プロセスを見てみると、python3 -c import neovim; neovim.start_host() $HOME.nvim/deoplete.nvim/rplugin/python3/deoplete.pyのCPU使用率がほぼ100%になります。

例えば、以下の内容のファイルtest.luaがあります。

print "hello"

ここで、nvim -u nvimrc-test test.luaで編集し、

print "hello"

p -- insert mode中で、ここにカーソルがある

まで入力すると、CPU使用率が一気に上昇します。

OSはArch Linux、NeovimはAURからインストールしたもので、バージョンは_0.0.0-alpha+201506121250_です。

nvimrc-testとログは https://gist.github.com/Nymphium/97aafd14098a032a6245 に貼りました。

Can't delete completed text in INSERT mode

I've updated to the latest version (9afefb0) but if I create a function like this:

<?php

$foo = "bar";
$foo|

The second $foo is autocompleted and if I try to remove it in INSERT mode with BACKSPACE it's not possible.

ver 0.0.1 works while latest commit doesn't work

Hi all,

I'm feel terribly stupid right now, but here's the thing: when using the latest release, everything works like a charm. When trying to work from HEAD, the autocomplete doesn't show up. I think I've pinned it down to the completion_begin function in init.py: if I'm on the latest release and use the completion_begin from HEAD, then it stops working.

Please tell me I'm doing something very stupid!

I do follow the update procedure (update files, call :UpdateRemovePlugins and call :DeopleteEnable).

Completion inserted at the wrong column

Hello.

I started to use racer (I use its omnifunc with deoplete) with deoplete a few days ago, so I am not sure if it is a racer issue or a deoplete issue.

When I type :: or ., the popup is sometimes not at the right column and the completion is not inserted at the right column.

For instance, if I type the following in neovim:

use std::

and choose the first completion (core_collections in my case), the result is:

core_collections

instead of the expected:

use std::core_collections

Here is my config:

" Deoplete
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_smart_case = 1

" Racer
let g:racer_cmd = "/usr/bin/racer"
let $RUST_SRC_PATH = "/usr/src/rust/src/"
let g:deoplete#omni_patterns = {}
let g:deoplete#omni_patterns.rust = '[(\.)(::)]'

Is my config wrong or is it a bug in deoplete or racer?

Moreover, if I continue to write, I get the normal completions instead of the completions from omnifunc. For instance, after writing:

use std::c

no completions is shown.

Is there a way to continue getting the completions from the omnifunc?

Thanks.

Development announce

Hi, users.

I will create new completion plugin for neovim.
It is deoplete.nvim (Dark powered nEO comPLETE).

if_python3 plugins are supported in neovim.
So, it is time to development.

I will release first alpha version of deolpete.nvim in May.
But it is not useful plugin.
It is just concept.

I will create "buffer" source in first.

And I will backport some completion patches in Vim to neovim.
This is needed for deoplete asynchronous.

Error in _do_complete

Error detected while processing function deoplete#mappings#_do_complete:
line    4:
E730: using List as a String
Press ENTER or type command to continue

To reproduce create the file bellow, and then type libstd in nvim

file: rplugin/python3/depolete/sources/perlomni.py

from .base import Base

import deoplete.util
class Source(Base):
    def __init__(self, vim):
        Base.__init__(self,vim)
        self.name = 'PerlOmni',
        self.mark =['P']

    def gather_candidates(self,context):

        values=[ 'libstdf::rec_ftr','libstdf::rec_gdr','libstdf::rec_hbr','libstdf::rec_header','libstdf::rec_mir',]
        return [{'word': x } for x in values]

completion doesn't work

deoplete.vimを最新にしたところ、補完が動かなくなりました。
https://github.com/Nymphium/vimconfig/tree/neovim に全ての設定が書いてありますが、deoplete.vimに関しては

let g:deoplete#enable_at_startup = 1

のみです。:messageにエラーメッセージは出ていません。
NeovimのバージョンはCommit: 0685489ee5b958b9cae6b2a36ab3f508559f550a(AURからインストール)、OSはArch Linuxです。

no request handler registered for...DeopleteInitializePython

Hi, so when I run neovim after some ~5 seconds I get this error:

Error detected while processing function deoplete#init#enable..remote#define#CommandBootstrap:
line    5:
Exception('no request handler registered for "/Users/tomsogat/.vim/bundle/deoplete.nvim/rplugin/python3/deoplete.py:command:DeopleteInitializePython"',)

Then the only thing I can do is to manualy execute :DeopleteInitializePython and then deoplete works ok. I did't notice this issue on my other laptop (Linux) with the same nvim config.

deoplete config

  let g:deoplete#enable_at_startup = 1
  let g:deoplete#enable_smart_case = 1
  let g:deoplete#omni_patterns = {}
  let g:deoplete#omni_patterns.ruby = ['[^. *\t]\.\w*', '\h\w*::']
  let g:deoplete#sources = {}
  let g:deoplete#sources._ = ['buffer', 'tag']

neovim --version

NVIM 0.0.0-alpha+201508310318 (compiled Aug 31 2015 21:52:32)
Commit: 73db02b99c07d933a2bbbb9d4a29022699b436ab
Build type: RelWithDebInfo
Compilation: /usr/local/Library/ENV/4.3/clang -Wconversion -O2 -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim20150831-89311-u5e6a4/build/config -I/tmp/neovim20150831-89311-u5e6a4/src -I/tmp/neovim20150831-89311-u5e6a4/deps-build/usr/include -I/tmp/neovim20150831-89311-u5e6a4/deps-build/usr/include -I/tmp/neovim20150831-89311-u5e6a4/deps-build/usr/include/luajit-2.0 -I/tmp/neovim20150831-89311-u5e6a4/deps-build/usr/include -I/tmp/neovim20150831-89311-u5e6a4/deps-build/usr/include -I/tmp/neovim20150831-89311-u5e6a4/deps-build/usr/include -I/tmp/neovim20150831-89311-u5e6a4/deps-build/usr/include -I/sw/include -I/sw/include -I/tmp/neovim20150831-89311-u5e6a4/build/src/nvim/auto -I/tmp/neovim20150831-89311-u5e6a4/build/include
Compiled by [email protected]

Nvim log was empty.

problem with semantic completion

hello @shugo

i have a question when edit a css file .deoplete show me just completion from buffer i have to presse <c-x><c-o> to get semantic completion . if there is possible how can i get both buffer and semantic completion

inserting function prototype on complete

@Shougo you made a beautiful work on that by using neosnnipet but i think there is a lot of problem with that due to neosnnipet features .

i find another way using ultisnips . take a look at and hope it will hwlp the users of deoplete and neosnnipet

function! MyOnCompleteDone()
    if !exists('v:completed_item') || empty(v:completed_item)
       return
   endif

let complete_str = v:completed_item.word
if complete_str == ''
    return
endif
let abbr = v:completed_item.abbr
let startIdx = match(abbr,"(")
let endIdx = match(abbr,")")
if endIdx - startIdx > 1
    let argsStr = strpart(abbr, startIdx+1, endIdx - startIdx -1)
    let argsList = split(argsStr, ",")
    let snippet = "" 
    let c = 1
    for i in argsList
        if c > 1 
            let snippet = snippet. ", "
        endif
        " strip space
        let arg = substitute(i, '^\s*\(.\{-}\)\s*$', '\1', '') 
        let snippet = snippet . '${'.c.":".arg.'}'
        let c += 1
    endfor
    let snippet = snippet . ")$0"
    call UltiSnips#Anon(snippet)
endif
 endfunction
 autocmd CompleteDone *.go  call MyOnCompleteDone()

Complete position for multibyte lines

Hi,

The vim complete function takes the byte position as input. But in deoplete a:context.complete_position is the actual character position.

So when there are multibyte characters at the same line, there is an offset and the completion pops up at the wrong position:
deoplete-multibyte

Currently my local workaround is this reassignment to the byte position after everything else is done:

cont['complete_position'] = \
    len(bytes(cont['input'][: cont['complete_position']], 'utf-8'))

Use official location for Python sources

Both NeoVim and Vim officially support {plugin_runtime_path}/python{2,3,x} directories as locations where python modules should be placed. I think that it is what should be used in place of autoload/deoplete.

File path completion conflicts with js completion

Not sure if this would be an issue with deoplete or my omnifun, but when using

<script src=""></script>

and trying to autocomplete the path, I end up getting completion for js code, not the path.

I can temporarily override this by using c-x c-f, but if you delete a character, code completion kicks back in.

I have the latest release of deoplete and neoinclude.
This is my omnifunc for javascript

  autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS

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.