gtags.vim icon indicating copy to clipboard operation
gtags.vim copied to clipboard

Fix error in using 'Gtags -f'

Open zhougy0717 opened this issue 5 years ago • 6 comments

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

zhougy0717 avatar Mar 09 '19 14:03 zhougy0717

In this plugin, the tags fild is not generated in the root of the project.

wsdjeg avatar Mar 10 '19 01:03 wsdjeg

@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

zhougy0717 avatar Mar 10 '19 02:03 zhougy0717

The global command can be 'global -f /path/to/file'

zhougy0717 avatar Mar 10 '19 02:03 zhougy0717

@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/

zhougy0717 avatar Apr 21 '19 22:04 zhougy0717

can you test the master brach now?

wsdjeg avatar Oct 25 '19 14:10 wsdjeg

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

ahcometrue avatar Dec 26 '20 12:12 ahcometrue