gutentags_plus icon indicating copy to clipboard operation
gutentags_plus copied to clipboard

Something wrong.

Open Abson opened this issue 7 years ago • 9 comments

image

Abson avatar Jun 04 '18 08:06 Abson

gtags can't generate database for your project, you have to check the error output from gtags

step 1: allow advanced commands:

let g:gutentags_define_advanced_commands = 1

step 2: Enable log

:GutentagsToggleTrace

step 3: check ":messages" when you encountered this error again.

You will see the error log for gtags.

skywind3000 avatar Jun 10 '18 02:06 skywind3000

文章底部有详细的错误排查方法:

https://zhuanlan.zhihu.com/p/36279445

skywind3000 avatar Jun 10 '18 02:06 skywind3000

I have the same problem. When I try to save a file with 'w' command, I get the error. Here is the log.

gutentags: gutentags: gtags-cscope job failed, returned: 122 gutentags: 'Running ctags on "/home/guru245/src/raspberrypi/drivers/media/dvb-core/dmxdev.c"' gutentags: 'ctags -f "/home/guru245/.cache/tags/home-guru245-src-raspberrypi-tags.temp" --options=/home/guru245/src/vim-studio/.vim/bundle/vim-gutentags/res/ctags_ recursive.options --append "/home/guru245/src/raspberrypi/drivers/media/dvb-core/dmxdev.c"' gutentags: 'Replacing tags file' gutentags: 'mv -f "/home/guru245/.cache/tags/home-guru245-src-raspberrypi-tags.temp" "/home/guru245/.cache/tags/home-guru245-src-raspberrypi-tags"' gutentags: 'Unlocking tags file...' gutentags: 'Done.' gutentags: Finished ctags job.

This is my .vimrc. " Set Gutentags let g:gutentags_modules = ['ctags', 'gtags_cscope'] let g:gutentags_project_root = ['.root'] let g:gutentags_cache_dir = expand('~/.cache/tags') let g:gutentags_auto_add_gtags_cscope = 0 let g:gutentags_define_advanced_commands = 1

guru245 avatar Jul 21 '18 16:07 guru245

Please run

:messages

after that error (make sure the gutentags trace has been enabled), you may see the gtags error output.

skywind3000 avatar Jul 21 '18 17:07 skywind3000

The log is after running :messages. Also gutentags trace is enabled with :GutentagsToggleTrace. It seems the log is not helpful to resolve the issue.

guru245 avatar Jul 22 '18 00:07 guru245

I see the cause. There is a tool named gtag-csope. I only knew and used cscope. Sorry for my ignorance. If you could update README.md, describing overview of gtag-scope or link to it, it would be a lot more helpful to understand.

guru245 avatar Jul 22 '18 01:07 guru245

I have the same problem. And it seems the log is not helpful to resolve the issue, it does not show any errors.

weizhou-chaojixx avatar Aug 09 '20 16:08 weizhou-chaojixx

I have the same problem, After I modify the script execution permission, it can be executed normally。the cmd is "chmod 777 ~/.vim/plugged/vim-gutentags/plat/unix/*"

jiffyHe avatar Oct 18 '22 03:10 jiffyHe

I have a PR for this: https://github.com/ludovicchabant/vim-gutentags/pull/336 But still unmerged.

You can simply use my fork: https://github.com/skywind3000/vim-gutentags

skywind3000 avatar Oct 18 '22 08:10 skywind3000