symbols-tree-view icon indicating copy to clipboard operation
symbols-tree-view copied to clipboard

No symbols listed for Typescript files

Open aarkayna opened this issue 8 years ago • 9 comments

I get the list showing up for .js and other files but nothing shows up for .ts files. CMD + R does give me the Atom dropdown with all the symbols listed however.

aarkayna avatar Mar 29 '16 18:03 aarkayna

+1

sqwk avatar Mar 31 '16 14:03 sqwk

+1

stewhouston avatar May 05 '16 19:05 stewhouston

+1

dogfoodsilo4 avatar Jun 03 '16 09:06 dogfoodsilo4

+1

juanfernandoe avatar Jul 26 '17 16:07 juanfernandoe

+1

arnovanoordt avatar Aug 14 '17 13:08 arnovanoordt

@aarkayna @sqwk @stewhouston @dogfoodsilo4 @juanfernandoe

Hi everyone,

What's missing is most probably the ctags definitions for typescript. There is an example here: https://herringtondarkholme.github.io/2015/10/10/typescript-ctags/ (other example are easy to find over the internet). You may want to try to add these definitions to the .ctags file in lib/.ctags As I do not use TypeScript, I have no idea whether they are convenient. If they are, could anyone let me know (either here or by opening a new issue there), so I'll add them in the next release of the forked package.

nicolashainaux avatar Aug 14 '17 14:08 nicolashainaux

Thanks @nicolashainaux ! The given ctags don't distinguish between methods and variables in classes, but it's already a lot better than no map at all :)

arnovanoordt avatar Aug 14 '17 14:08 arnovanoordt

I'm not too familiar with ctags but replacing the line --regex-typescript=/^[ \t]*(export)?[ \t]*(public|private)[ \t]+(static)?[ \t]*([a-zA-Z0-9_]+)/\4/m,members/ with --regex-typescript=/^[ \t]*(export)?[ \t]*(public|private)[ \t]+(static)?[ \t]*([a-zA-Z0-9_]+)\(/\4/m,function/ --regex-typescript=/^[ \t]*(export)?[ \t]*(public|private)[ \t]+(static)?[ \t]*([a-zA-Z0-9_]+):/\4/l,varlambdas/ distinguishes methods from the properties.. Not sure if this breaks something else, but it works for me ;)

arnovanoordt avatar Aug 14 '17 15:08 arnovanoordt

Perfect! I'll update the regex too then!

nicolashainaux avatar Aug 14 '17 15:08 nicolashainaux