gtags.vim
gtags.vim copied to clipboard
Fix error in using 'Gtags -f'
As shown in the official GNU global site, while referring a DB outside project source tree, we have to set up the environment variable GTAGSROOT and GTAGSDBPATH. And we should be in the root of the project.
$ mkdir /var/dbpath
$ cd /cdrom/src # the root of source tree
$ gtags /var/dbpath # make tag files in /var/dbpath
$ export GTAGSROOT=`pwd`
$ export GTAGSDBPATH=/var/dbpath
$ global func
In this plugin, the tags fild is not generated in the root of the project.
@wsdjeg that's right. But you have to specify the GTAGSROOT as the project root, otherwise, you will run into errors. You can try with bare global in command line
The global command can be 'global -f /path/to/file'
@wsdjeg Here is a blog post for illustrating what the bug is and how I get it fixed. https://zhougy0717.github.io/2019/03/24/SpaceVim_gtags_and_cscope/
can you test the master brach now?
Error: global command failed. command line: global --result=ctags-x -qf 'app/Amqp/Consumer/Comment.php'
- neovim version info
NVIM v0.4.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20201114-45415-1dcr9av/neovim-0.4.4/build/config -I/tmp/neovim-20201114-45415-1dcr9av/neovim-0.4.4/src -I/usr/local/include -I/tmp/neovim-20201114-45415-1dcr9av/neovim-0.4.4/deps-build/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20201114-45415-1dcr9av/neovim-0.4.4/build/src/nvim/auto -I/tmp/neovim-20201114-45415-1dcr9av/neovim-0.4.4/build/include
Compiled by brew@BigSur
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.4.4/share/nvim"
Run :checkhealth for more info