help-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ctags as a source for gtags


From: Shigio YAMAGUCHI
Subject: Re: ctags as a source for gtags
Date: Tue, 21 Jan 2014 18:13:36 +0900

Hi,
> gtags -vv -f x/src/main/scala/Message.scala

Arguments are unnecessary to gtags command.
Please do like follows.

$ gtags -v

By the way, it seems that ctags does not support Scala language.
So, you need to do the following two at least.

1. write a Scala parser for ctags.
2. write mapping definitions for Scala to 'gtags.conf'.

I don't know about 1.
The 2. is simple. Just adding the following to 'gtags.conf'.

[/usr/local/share/gtags/gtags.conf]
...
:langmap=Scala\:.scala:\
:gtags_parser=Scala\:/usr/local/lib/gtags/exuberant-ctags.la:\

Good luck.



2014/1/21 Felix Geller <address@hidden>
Hi,

I'm trying to use ctags as a source for gtags for scala files, but am not getting any tags in gtags while ctags finds them. For example:

gtags only prints a warning:

gtags -vv -f x/src/main/scala/Message.scala
Tue Jan 21 11:31:41 NZDT 2014] Gtags started.
 Using config file '/usr/local/share/gtags/gtags.conf'.
 Using plug-in parser.
 Using '.x/src/main/scala/Message.scala' as a file list.
[Tue Jan 21 11:31:41 NZDT 2014] Creating 'GTAGS' and 'GRTAGS'.
[... Lots of warnings ...]
Warning: 'trait Message {' not found. ignored.

But ctags is happily identifying the name:

ctags -x x/src/main/scala/Message.scala                   
Message       traits      220 ./x/src/main/scala/Message.scala trait Message {

Looking through the archives I found that missing GTAGSCONF or GTAGSLABEL might be a problem, but they are set:

set | ag GTA 
GTAGSCONF=/usr/local/share/gtags/gtags.conf
GTAGSLABEL=ctags

And there is a ctags label for excuberant tags in my /usr/local/share/gtags/gtags.conf

What might be missing? I would appreciate any help to debug this :)

Thanks!

Felix

_______________________________________________
Help-global mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-global




--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]