I just found the coffeetags tool and can confirm that it works with vim.
Is there something similar for Emacs? Has anyone managed to get etags working for Emacs with coffeescript?
I just found the coffeetags tool and can confirm that it works with vim.
Is there something similar for Emacs? Has anyone managed to get etags working for Emacs with coffeescript?
Have you tried following recipe? But you may need to use exuberant ctags, not default etags...
This it what I've done (thanks to Alex Ott for the link):
Create a .ctags
file in your project root directory (here is the link to the original Gist):
--langdef=CoffeeScript
--langmap=CoffeeScript:.coffee
--regex-CoffeeScript=/(^|=[ \t])*class ([A-Za-z.]+)( extends [A-Za-z.]+)?$/\2/c,class/
--regex-CoffeeScript=/^[ \t]*@?([A-Za-z.]+):.*[-=]>.*$/\1/f,function/
--regex-CoffeeScript=/^[ \t]*([A-Za-z.]+)[ \t]+=.*[-=]>.*$/\1/f,function/
--regex-CoffeeScript=/^[ \t]*([A-Za-z.]+)[ \t]+=[^->\n]*$/\1/v,variable/
Generate the TAGS file: ctags -e -R source_folder
Have you tried following recipe? But you may need to use exuberant ctags, not default etags...
© 2022 - 2024 — McMap. All rights reserved.
-e
option on my vm. Tryetas -R source_folder
in case you don't either. – Extempore