stites
stites

Reputation: 5143

Tags not found in neovim, but work in vim

I have a tags file which is being generated and placed in my project's directory and set tags=./tags,tags;/ placed in my init.vim (edit: this was to ensure that the configuration is the same across both editors)

The crazy thing is that, when looking for tags in neovim (v0.1.7), nothing is found, however tagbar (majutsushi/tagbar) seems to find these tags correctly. Furthermore, I have set tags to point directly to the tag file (set tags=/home/<me/project/>tags) with no change in outcome. When I perform the same steps in vim (v8.0, 2016 Sep 12) these tags are found correctly.

Does neovim handle ctags in a different way from vim or am I missing something simple?

Thanks

EDIT:

@Justin M. Keyes is correct in the behavior of vim and neovim. I failed to ask the vague question of "why is my system broken" since there was not a whole lot to go on, but the answer to this, for me, was found here:

Why can't vim see the tags file, despite being in the same directory? - Vi and Vim Exchange (beta)

In my case the vim-scripts/gitignore plugin was adding patterns to my wildignore variable which obscured my editor from finding my tags file.

Upvotes: 0

Views: 3126

Answers (1)

Justin M. Keyes
Justin M. Keyes

Reputation: 6964

set tags=./tags,tags;/ is an unsual choice. As mentioned at :help 'tags', the default in nvim is:

'tags' 'tag'            string  (default "./tags;,tags")

Try not setting the 'tags' option, use the default instead.

when looking for tags in neovim (v0.1.7), nothing is found, however tagbar (majutsushi/tagbar) seems to find these tags correctly

It's not unlikely that tagbar looks in places other than what is specified by the 'tags' option.

Does neovim handle ctags in a different way from vim

No, only the default changed.

Upvotes: 1

Related Questions