symbols-tree-view
symbols-tree-view copied to clipboard
No symbols listed for Typescript files
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.
+1
+1
+1
+1
+1
@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.
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 :)
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 ;)
Perfect! I'll update the regex too then!