Skip to content

Not compatible with CoffeeTags? #33

Closed

Description

@okonet

I'm working with CoffeeScript most of the time and I suffer from lack of CTags for that language so I gave CoffeeTags a try:

https://github.com/lukaszkorecki/CoffeeTags

It states it's compatible with CTags but after running it recursively on a working directory I still get "not found" errors in ST2 trying to navigate to definition.

I'm not sure it's CTags plugin problem or CoffeeTags. Either way I would appreciate any help to get it working.

Thanks!

Activity

  1. barneywilliams commented on May 16, 2012

    @barneywilliams
    Member

    Did you run ctags manually (from the command line)? Or did you use the menu item or keybinding?

  2. okonet commented on May 16, 2012

    @okonet
    Author

    I did run it via CLI and then checked .tags file. I could submit it so you can investigate if it is plugin or CoffeeTags bug.

  3. lukaszkorecki commented on Jul 23, 2012

    @lukaszkorecki

    Hiya! CoffeeTags author here

    I can help looking into this - I'm not a ST2 user myself, but CoffeeTags is supposed to work everywhere :-)

  4. okonet commented on Jul 23, 2012

    @okonet
    Author

    Hey, would be nice! Thanks!

  5. barneywilliams commented on Nov 9, 2012

    @barneywilliams
    Member

    @lukaszkorecki Any luck in your investigation?

  6. lukaszkorecki commented on Nov 9, 2012

    @lukaszkorecki

    @barneywilliams sorry didn't have time recently... I will try to look into it soon.

  7. barneywilliams commented on Dec 17, 2012

    @barneywilliams
    Member

    OK, lemme know when and if you get time to investigate @lukaszkorecki

  8. shirosaki commented on Jan 28, 2013

    @shirosaki

    Hi,

    Tags file should be sorted by symbol. bisect is used for symbol search.

    https://github.com/SublimeText/CTags/blob/master/ctags.py#L224

    Unfortunately coffeetags output is not sorted by symbol. It seems to be sorted by file name, line number.
    By sorting it manually, coffee tags seems to work.

    $ coffeetags -R -f coffeetags
    $ ruby -e 'l = STDIN.readlines; for i in (l[0,6] + l[7,l.size].sort); puts i; end' < coffeetags > tags
    

    Coffeetags output looks different from ctags output. Sublime text ctags seems to use match expression, but not lineno to look up the definition. Tag jump doesn't work as expected if the definition is under the references.

    https://github.com/lukaszkorecki/CoffeeTags/blob/master/spec/fixtures/out.test.ctags

  9. lukaszkorecki commented on Jan 28, 2013

    @lukaszkorecki

    @shirosaki so I'm guessing to fix this I'd have to add a flag which sorts the tags by symbol, right? The thing is that vim works just fine with tags generated by regular CTags, Coffeetags and jsctags (aka doctorjs).

    I've used jsctags output as a base for the format which coffeetags produces - probably that was my mistake.

  10. shirosaki commented on Jan 28, 2013

    @shirosaki

    @lukaszkorecki that is right. It would be nice to add a feature to sort by symbol.

    Ctags output is sorted by symbol (tagname) as the following document.

    http://ctags.sourceforge.net/FORMAT

    1. The tags file is sorted on {tagname}. This allows for a binary search in the file.
  11. shirosaki commented on Jan 29, 2013

    @shirosaki

    I've created a patch for coffeetags to make more compatible with ctags.

    I think this issue could also be fixed on sublime text side.

  12. lukaszkorecki commented on Feb 2, 2013

    @lukaszkorecki

    Hi all - thanks to @shirosaki we got a build of CoffeeTags which is supposed to work with Sublime Text's ctags plugin.

    I haven't tested it myself, but all tests pass without any problem.

    I will release the gem shortly (I've been waiting for RubyGems to lift the publish ban established due to security issues).

    edit ok, v0.0.3 is live https://rubygems.org/gems/CoffeeTags

  13. shirosaki commented on Feb 4, 2013

    @shirosaki

    @lukaszkorecki thank you for new release! It works fine for me.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions