c0r73x / neotags.nvim

Tag highlight in neovim
MIT License
122 stars 9 forks source link

Error on neotags_enabled : Key not found without configuration #4

Closed bew closed 7 years ago

bew commented 7 years ago

Hi, just install this plugin, and restarted, I get this error :

error caught while executing async callback:                                                                                                                                                                       
NvimError(b'Key not found',)                                                                                                                                                                                       
Traceback (most recent call last):                                                                                                                                                                                 
  File "/home/lesell_b/.config/nvim/plugged/neotags.nvim/rplugin/python3/neotags/neotags.py", line 37, in init                                                                                                     
    if(self.__vim.vars['neotags_enabled']):                                                                                                                                                                        
  File "/usr/lib/python3.5/site-packages/neovim/api/common.py", line 78, in __getitem__                                                                                                                            
    return self._get(key)                                                                                                                                                                                          
  File "/usr/lib/python3.5/site-packages/neovim/api/nvim.py", line 131, in request                                                                                                                                 
    res = self._session.request(name, *args, **kwargs)                                                                                                                                                             
  File "/usr/lib/python3.5/site-packages/neovim/msgpack_rpc/session.py", line 98, in request                                                                                                                       
    raise self.error_wrapper(err)                                                                                                                                                                                  
neovim.api.nvim.NvimError: b'Key not found'                                                                                                                                                                        

the call was requested at                                                                                                                                                                                          
  File "/usr/lib/python3.5/site-packages/neovim/api/nvim.py", line 159, in filter_request_cb                                                                                                                       
    result = request_cb(name, args)                                                                                                                                                                                
  File "/usr/lib/python3.5/site-packages/neovim/plugin/host.py", line 92, in _on_request                                                                                                                           
    rv = handler(*args)                                                                                                                                                                                            
  File "/usr/lib/python3.5/site-packages/neovim/plugin/host.py", line 70, in _wrap_function                                                                                                                        
    return fn(*args)                                                                                                                                                                                               
  File "/home/lesell_b/.config/nvim/plugged/neotags.nvim/rplugin/python3/neotags/__init__.py", line 20, in init                                                                                                    
    self.__vim.async_call(self.__neotags.init)

The error goes off if I set let g:neotags_enabled = 1 in init.vim, but as there shoud be default values, I think this is not the wanted behavior

c0r73x commented 7 years ago

Oh, my bad... neotags_enabled has default 0, I will change that.

But it shouldn't crash, i will add a check.