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

Not compatible with CoffeeTags? #33

Closed
okonet opened this issue Apr 16, 2012 · 13 comments
Closed

Not compatible with CoffeeTags? #33

okonet opened this issue Apr 16, 2012 · 13 comments

Comments

@okonet
Copy link

okonet commented Apr 16, 2012

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!

@barneywilliams
Copy link
Member

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

@okonet
Copy link
Author

okonet commented May 16, 2012

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.

@lukaszkorecki
Copy link

Hiya! CoffeeTags author here

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

@okonet
Copy link
Author

okonet commented Jul 23, 2012

Hey, would be nice! Thanks!

@barneywilliams
Copy link
Member

@lukaszkorecki Any luck in your investigation?

@lukaszkorecki
Copy link

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

@barneywilliams
Copy link
Member

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

@shirosaki
Copy link

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

@lukaszkorecki
Copy link

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

@shirosaki
Copy link

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

@shirosaki
Copy link

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.

@lukaszkorecki
Copy link

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

@shirosaki
Copy link

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants