hrsh7th / vim-vsnip-integ

vim-vsnip integrations to other plugins.
MIT License
128 stars 16 forks source link

Error `Key not found: vsnip_integ_config` with deoplete in v2. #20

Closed halkn closed 4 years ago

halkn commented 4 years ago

Thank you your plugin.

After upgrading to v2, the following error occurs when used with deoplete.

[deoplete] Traceback (most recent call last):
  File "/Users/haruki/Library/Python/3.7/lib/python/site-packages/pynvim/api/common.py", line 108, in __getitem__
    return self._get(key)
  File "/Users/haruki/Library/Python/3.7/lib/python/site-packages/pynvim/api/nvim.py", line 182, in request
    res = self._session.request(name, *args, **kwargs)
  File "/Users/haruki/Library/Python/3.7/lib/python/site-packages/pynvim/msgpack_rpc/session.py", line 104, in request
    raise self.error_wrapper(err)
pynvim.api.common.NvimError: Key not found: vsnip_integ_config
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/Users/haruki/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 194, in _gather_results
    result = self._get_result(context, source)
  File "/Users/haruki/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 254, in _get_result
    ctx['candidates'] = source.gather_candidates(ctx)
  File "/Users/haruki/.local/share/nvim/plugged/vim-vsnip-integ/rplugin/python3/deoplete/source/vsnip.py", line 16, in gather_candidates
    config = self.vim.vars['vsnip_integ_config']
  File "/Users/haruki/Library/Python/3.7/lib/python/site-packages/pynvim/api/common.py", line 110, in __getitem__
    raise transform_keyerror(exc)
KeyError: 'Key not found: vsnip_integ_config'
Error from vsnip: 'Key not found: vsnip_integ_config'.  Use :messages / see above for error details.
Press ENTER or type command to continue

Seems not to use the global variable g:vsnip_integ_config from v2. It seems that if I add the following settings to my vimrc it works fine.

let g:vsnip_integ_config = {
\ 'deoplete': v:true
\ }

Is this required?

hrsh7th commented 4 years ago

Thank you for the information!

I've fixed it.

hrsh7th commented 4 years ago

The v2 does not have any settings, sorry!