Search code examples
ctagsexuberant-ctags

Exuberant Ctags 5.8 generating incomplete tags file for specific project


Using Arch Linux and I have Ctag 5.8 installed.

My Go project has this structure:

.
├── apply
│   └── apply.go
├── calculate
│   └── calculate.go
├── coupon.sqlite3
├── Godeps
│   ├── Godeps.json
│   └── Readme
├── main.go
├── Makefile
├── models
│   ├── cupom.go
│   ├── errorMessage.go
│   └── product.go
├── ping
│   └── ping.go
├── README.md
├── routes
│   └── routes.go
├── tags
├── tests
│   ├── apply_test.go
│   ├── calculate_test.go
│   ├── config.go
│   ├── coupon.sqlite3
│   └── fixtures
│       └── calculate.go

Running the command ctags -R or ctags -R . I have a tags file generated but with this content only.

!_TAG_FILE_FORMAT   2   /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED   1   /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR    Darren Hiebert  /[email protected]/
!_TAG_PROGRAM_NAME  Exuberant Ctags //
!_TAG_PROGRAM_URL   http://ctags.sourceforge.net    /official site/
!_TAG_PROGRAM_VERSION   5.8 //

Running the same command on other project generate the tags file correctly.


Solution

  • You have Exuberant Ctags installed, which does not support Go out of the box (http://ctags.sourceforge.net/languages.html).

    There are a bunch of different alternative programs or ways to add it to your existing ctags: