Hi,
Could you show me the output of  the following command line?

$ gtags -v --debug


2014/1/21 Felix Geller <fgel...@gmail.com>

> Hi!
>
> Thank you for your reply! I already have a ctags configuration for ctags,
> cf. the output of the ctags command I posted:
>
> $ ctags -x x/src/main/scala/Message.scala
> Message       traits      220 ./x/src/main/scala/Message.scala trait
> Message {
> (... omitted a couple of lines ...)
>
> This is my ctags config:
>
> --langdef=Scala
> --langmap=Scala:.scala
>
> --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[
> \t]*)*(private|protected)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\4/c,classes/
> --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[
> \t]*)*(private|protected)?[ \t]*object[ \t]+([a-zA-Z0-9_]+)/\4/c,objects/
> --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[
> \t]*)*(private|protected)?[ \t]*case class[
> \t]+([a-zA-Z0-9_]+)/\4/c,classes/
> --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[
> \t]*)*(private|protected)?[ \t]*case object[
> \t]+([a-zA-Z0-9_]+)/\4/c,objects/
> --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[
> \t]*)*(private|protected)?[ \t]*trait[ \t]+([a-zA-Z0-9_]+)/\4/t,traits/
> --regex-scala=/^[ \t]*type[ \t]+([a-zA-Z0-9_]+)/\1/T,types/
> --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*def[
> \t]+([a-zA-Z0-9_]+)/\3/m,methods/
> --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*val[
> \t]+([a-zA-Z0-9_]+)/\3/l,constants/
> --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*var[
> \t]+([a-zA-Z0-9_]+)/\3/l,variables/
> --regex-scala=/^[ \t]*package[ \t]+([a-zA-Z0-9_.]+)/\1/p,packages/
>
> And I have the following lines in my gtags.conf (I'm on Mac OS X,
> installed global via homebrew):
>
>     :langmap=Scala\:.scala:\
>     :gtags_parser=Scala\:/usr/local/Cellar/global/6.2.9/lib/gtags/
> exuberant-ctags.la:\
>
> I think gtags isn't picking up the ctags output, which might not contained
> required fields as Scala is a custom language for ctags? Do you know
> whether the ctags output is ok? As far as I understand the parser, it
> invokes `ctags -x` on each file, right?
>
> Again, thanks!
>
> Felix
>
>
>
>
> On Tue, Jan 21, 2014 at 8:11 PM, Shigio YAMAGUCHI <shi...@gnu.org> wrote:
>
>> 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 <fgel...@gmail.com>
>>
>>>  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
>>> Help-global@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/help-global
>>>
>>>
>>
>>
>> --
>> Shigio YAMAGUCHI <shi...@gnu.org>
>> PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3
>>
>
>


-- 
Shigio YAMAGUCHI <shi...@gnu.org>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3
_______________________________________________
Help-global mailing list
Help-global@gnu.org
https://lists.gnu.org/mailman/listinfo/help-global

Reply via email to