Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error in using 'Gtags -f' #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhougy0717
Copy link

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

@wsdjeg
Copy link
Member

wsdjeg commented Mar 10, 2019

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

@zhougy0717
Copy link
Author

@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
Copy link
Author

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

@zhougy0717
Copy link
Author

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

@wsdjeg
Copy link
Member

wsdjeg commented Oct 25, 2019

can you test the master brach now?

@ahcometrue
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants