ludovicchabant / vim-gutentags

A Vim plugin that manages your tag files
https://bolt80.com/gutentags/
MIT License
2.3k stars 175 forks source link

Remove tags file and get ctags job failed, return: 1 #288

Open foreverLoveWisdom opened 4 years ago

foreverLoveWisdom commented 4 years ago

I am using Vimwiki, and accidentally created tags file in my folder. I deleted the tags file, now whenever I save the file, I get that error. I guess because gutentags is looking for the tags file but it can't find it. I have tried to exclude the wiki file but still get the error. Here is my configuration in Neovim:

let g:gutentags_ctags_executable_ruby = 'ripper-tags'
let g:gutentags_ctags_extra_args = ['--ignore-unsupported-options', '--recursive']
let g:gutentags_ctags_exclude = ["*.wiki", "*.min.js", "*.min.css", ".git", "node_modules", "build", "vendor"]
let g:gutentags_trace = 1
ludovicchabant commented 4 years ago

Gutentags should work perfectly fine if there's no tags file initially. What file are you saving that makes it complain? Can you also enable logging (call gutentags#toggletrace()) and post the output?

wassimk commented 2 years ago

I was having the same issue with the exit code of 1.

I only had this problem in Ubuntu. My macOS install via brew was OK.

I could find nothing wrong in vim-gutentags. I then started running the ctags command by hand. There is a way to echo a debug message when your config file is loaded. I tried it and noticed mine never output the debug message. I then manually did --options=my-config-file.ctags and was getting permission denied error even though they were right.

I uninstalled universal-ctags via snap and built from source. All problems resolved.