c0r73x / neotags.nvim

Tag highlight in neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No such file or directory when starting neovim

Elhodred opened this issue · comments

Hi guys,

I installed neotags.vim, compiled the binary and added this config in init.vim:

let g:neotags_enabled = 1
let g:neotags_highlight = 1
let g:neotags_run_ctags = 1
let g:neotags_verbose = 1
let g:neotags_recursive = 1
let g:neotags_no_autoconf = 1

For some reason, when starting neovim, I get this error:

error caught while executing async callback:
FileNotFoundError(2, 'No such file or directory')
Traceback (most recent call last):
File "/Users/elhodred/code/dotfiles/config/nvim/plugged/neotags.nvim/rplugin/python3/neotags/neotags.py", line 137, in init
self.update(False)
File "/Users/elhodred/code/dotfiles/config/nvim/plugged/neotags.nvim/rplugin/python3/neotags/neotags.py", line 156, in update
self._update(ft, force)
File "/Users/elhodred/code/dotfiles/config/nvim/plugged/neotags.nvim/rplugin/python3/neotags/neotags.py", line 278, in _update
self.__groups[ft] = self._parseTags(ft)
File "/Users/elhodred/code/dotfiles/config/nvim/plugged/neotags.nvim/rplugin/python3/neotags/neotags.py", line 396, in _parseTags
return self._get_tags(files, ft)
File "/Users/elhodred/code/dotfiles/config/nvim/plugged/neotags.nvim/rplugin/python3/neotags/neotags.py", line 558, in _get_tags
with self._open(File, 'rb', comp_type) as fp:
File "/Users/elhodred/code/dotfiles/config/nvim/plugged/neotags.nvim/rplugin/python3/neotags/neotags.py", line 943, in _open
return eval(string)
File "", line 1, in
File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/gzip.py", line 53, in open
binary_file = GzipFile(filename, gz_mode, compresslevel)
File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/gzip.py", line 163, in init
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/Users/elhodred/.vim_tags/__Users__elhodred__Nextcloud__Projects__Athonet__kamailio.tags.gz'

the call was requested at
File "/usr/local/lib/python3.6/site-packages/neovim/api/nvim.py", line 210, in filter_notification_cb
notification_cb(name, args)
File "/usr/local/lib/python3.6/site-packages/neovim/plugin/host.py", line 107, in _on_notification
handler(*args)
File "/usr/local/lib/python3.6/site-packages/neovim/plugin/host.py", line 69, in _wrap_function
return fn(*args)
File "/Users/elhodred/code/dotfiles/config/nvim/plugged/neotags.nvim/rplugin/python3/neotags/init.py", line 20, in init
self.__vim.async_call(self.__neotags.init)

I don't know where to look. Please, someone can give me some directions?

Ok, after reading some other issues, I found that I need Universal Ctags instead of Exuberant. After installing it everything works.

Not having Universal Ctags is indeed the issue. The way the plugin parses the tags makes use of some of the new features added to Universal Ctags over Exuberant. I modified the script to give a warning if the wrong version is installed rather than throwing up that rather unsightly stacktrace. I also added a check in case the tags file isn't found where it is expected to be for whatever other reason. That check should have been there to begin with.

Even though you solved your problem yourself, thanks for opening this issue. I should really update the documentation to reflect the fact that Universal Ctags is required.

Thanks to you for this awesome plugin. I was getting a bit annoyed with others because they didn't work properly