c0r73x / neotags.nvim

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

JavaScript - TypeError: sequence item 6: expected str instance, list found #31

Closed c0r73x closed 5 years ago

c0r73x commented 6 years ago

Error

@roflcopter4 not sure why this happends since the last commit, everything works as it should in C but in JavaScript i get the following error.

roflcopter4 commented 6 years ago

For some reason I can't load your link. What is the error exactly? On what line is it looking for a string?

The last commit was a bit of a problem. I've noticed a few other bugs as well. If I can't fix them I might even revert the commit.

c0r73x commented 6 years ago

Humm my server has removed the link, anyway here is the error.

error caught while executing async callback:
TypeError('sequence item 6: expected str instance, list found',)
Traceback (most recent call last):
  File "/home/uscpe/dotfiles/vim/.vim/bundle/neotags.nvim/rplugin/python3/neotags/neotags.py", line 179, in update
    self.highlight(force, hl)
  File "/home/uscpe/dotfiles/vim/.vim/bundle/neotags.nvim/rplugin/python3/neotags/neotags.py", line 218, in highlight
    if not self._highlight(hl, groups[hl.key], force):
  File "/home/uscpe/dotfiles/vim/.vim/bundle/neotags.nvim/rplugin/python3/neotags/neotags.py", line 294, in _highlight
    hl.suffix, ','.join(hl.notin)))
TypeError: sequence item 6: expected str instance, list found

the call was requested at
  File "/usr/lib64/python3.5/site-packages/neovim/api/nvim.py", line 210, in filter_notification_cb
    notification_cb(name, args)
  File "/usr/lib64/python3.5/site-packages/neovim/plugin/host.py", line 107, in _on_notification
    handler(*args)
  File "/usr/lib64/python3.5/site-packages/neovim/plugin/host.py", line 69, in _wrap_function
    return fn(*args)
  File "/home/uscpe/dotfiles/vim/.vim/bundle/neotags.nvim/rplugin/python3/neotags/__init__.py", line 24, in highlight
    self.__vim.async_call(self.__neotags.update, False)
roflcopter4 commented 6 years ago

I think that should do it. The offending problem was a silly oversight on my part. I wanted to add back global notin information after noticing that it was a tiny fraction of a second faster, so I just appended the list onto whatever notin information was supplied with the group. That's why it's finding a list instead of a string. I forgot to unpack the list. Solved. I think.

I also noticed however that on my system, with the default javascript setup, no tags are highlighted at all. If I get rid of all of the notin stuff in plugin/neotags/javascript.vim then everything is fine. I've never touched these values, so I don't know why it would be doing this. Do you have a highly customized syntax file for JS or is mine broken somehow?

c0r73x commented 6 years ago

Yes now it works alot better :+1:

Humm it's not that custom, I just added some custom notin's to my neotags/javascript.vim. I don't use the default highlights though, that might be it?