Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined variable g:deoplete#_channel_id on completion #197

Closed
tony opened this issue Mar 2, 2016 · 3 comments
Closed

Undefined variable g:deoplete#_channel_id on completion #197

tony opened this issue Mar 2, 2016 · 3 comments
Assignees

Comments

@tony
Copy link

tony commented Mar 2, 2016

Problems summary

I hit ctrl-n for completion, get this error:

E117: Unknown function: pythoncomplete#Complete
E117: Unknown function: pythoncomplete#Complete
Error detected while processing function deoplete#mappings#_rpcnotify_wrapper:
line    1:
E121: Undefined variable: g:deoplete#_channel_id
Error detected while processing function deoplete#mappings#_rpcnotify_wrapper:
line    1:
E116: Invalid arguments for function rpcnotify

I have python client installed for python 3 in my user packages and inside the virtualenv I'm in (which is also python 3)

~/work/django-website .venv django-v1.9* 1m 2s
❯ pip install neovim
Requirement already satisfied (use --upgrade to upgrade): neovim in ./.venv/lib/python3.5/site-packages
Requirement already satisfied (use --upgrade to upgrade): msgpack-python>=0.4.0 in ./.venv/lib/python3.5/site-packages (from neovim)
Requirement already satisfied (use --upgrade to upgrade): greenlet in ./.venv/lib/python3.5/site-packages (from neovim)

Expected

Completion should show the classes available inside the module from jedi

Environment Information

  • OS: FreeBSD 11-CURRENT
  • Neovim version: v0.1.2

Provide a minimal init.vim with less than 50 lines (Required!)

" Your minimal init.vim

if filereadable(expand("~/.vim/.vimrc"))
  "exe 'source' expand("~/.vim/.vimrc")
elseif filereadable(expand("~/.vimrc"))
  "exe 'source' expand("~/.vimrc")
endif

set runtimepath+=~/.vim/bundle/deoplete.nvim/
set runtimepath+=~/.vim/bundle/jedi-vim/

" deoplete.vim
" credit: https://gist.github.com/zchee/c314e63ae8b6bea50bb4
let g:deoplete#enable_at_startup = 1
set completeopt+=noinsert
set completeopt-=preview
let g:deoplete#enable_ignore_case = 'ignorecase'
let g:deoplete#auto_completion_start_length = 0
let g:min_pattern_length = 0
" https://github.com/Shougo/deoplete.nvim/issues/117
let g:deoplete#omni#input_patterns = {}
let g:deoplete#omni#input_patterns.html = '<[^>]*'
let g:deoplete#omni#input_patterns.xml  = '<[^>]*'
let g:deoplete#omni#input_patterns.md   = '<[^>]*'
let g:deoplete#omni#input_patterns.css   = '^\s\+\w\+\|\w\+[):;]\?\s\+\w*\|[@!]'
let g:deoplete#omni#input_patterns.scss   = '^\s\+\w\+\|\w\+[):;]\?\s\+\w*\|[@!]'
let g:deoplete#omni#input_patterns.sass   = '^\s\+\w\+\|\w\+[):;]\?\s\+\w*\|[@!]'
let g:deoplete#omni#input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)\w*'
let g:deoplete#omni#input_patterns.cpp = ['[^. *\t]\.\w*', '[^. *\t]\::\w*', '[^. *\t]\->\w*', '[<"].*/']

let g:deoplete#omni#input_patterns.javascript = '[^. \t]\.\%(\h\w*\)\?'
let g:deoplete#omni#input_patterns.go = '[^.[:digit:] *\t]\.\w*'
let g:deoplete#omni#input_patterns.ruby = ['[^. *\t]\.\w*', '\h\w*::']

if !exists('g:spf13_no_neosnippet_expand')
  imap <C-k> <Plug>(neosnippet_expand_or_jump)
  smap <C-k> <Plug>(neosnippet_expand_or_jump)
  xmap <C-k> <Plug>(neosnippet_expand_target)
  smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
  \ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"

  " For conceal markers.
  if has('conceal')
    set conceallevel=2 concealcursor=niv
  endif
endif

let g:deoplete#ignore_sources = {}
let g:deoplete#ignore_sources._ = ['buffer', 'vim', 'member']
let g:deoplete#sources#go = 'vim-go'

inoremap <expr><C-n> deoplete#mappings#manual_complete()


if exists(':DeopleteEnable')
  let g:jedi#completions_enabled = 0
  let g:jedi#auto_vim_configuration = 0
  let g:jedi#smart_auto_mappings = 0
  let g:jedi#show_call_signatures = 0
endif

The reproduce ways from neovim starting (Required!)

  1. Load vim from within a virtualenv
  2. Go to a python file that would have completion (from django.db import models)
  3. hi = models. and type <C-n>

Generate a logfile if appropriate

  1. export NVIM_PYTHON_LOG_FILE=/tmp/log
  2. export NVIM_PYTHON_LOG_LEVEL=DEBUG
  3. nvim -u minimal.vimrc
  4. some works
  5. cat /tmp/log_{PID}

Upload the log file

log_8879.txt
log_8905.txt

@zchee zchee self-assigned this Mar 3, 2016
@zchee
Copy link
Collaborator

zchee commented Mar 3, 2016

@tony Thanks, issue.

Now, deoplete.nvim not recommend jedi-vim.
For Python, https://github.com/zchee/deoplete-jedi instead of.

If you have problem caused by deoplete-jedi, please post issue to https://github.com/zchee/deoplete-jedi/issues/new
Close.

@zchee zchee closed this as completed Mar 3, 2016
@tony
Copy link
Author

tony commented Mar 3, 2016

Solid.

@tony
Copy link
Author

tony commented Mar 3, 2016

This same error still happens with deoplete-jedi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants