alibaba / structure-view

Structure View for ATOM editor, just like Outline view in Eclipse or Structure tool window in IDEA / WebStorm, provides quick navigation for symbols of source code with a tree view.
https://atom.io/packages/structure-view
MIT License
34 stars 15 forks source link

Support for more languages? #3

Open nicolashainaux opened 7 years ago

nicolashainaux commented 7 years ago

It may be worth joining efforts on the same plugin rather than scattering through various projects. The .ctags version of symbols-tree-nav has been patched several times, maybe you could take it to update the one of structure-view to better support languages (and/or support more)?

symbols-tree-view, as well as symbols-tree-nav, uses an external binary to parse the files, I think the support for several languages is only due to this binary even if the current version is broken for several languages in symbols-tree-view. For instance there's no regex for python in the .ctags files of symbols-tree-view (nor symbols-tree-nav), yet python is supported. I don't understand completely how you parse files (looks like everything is done in javascript?), but maybe an external binary would allow a support for more languages?

Joouis commented 7 years ago

@nicolashainaux Totally agree with you. Structure-view absorbs that .ctags file with ctags binaries as backup solution for those languages haven't been deep supported yet. I guess that .ctags could be a supplement for ctags, even if there's no regex for py in it. But I don't think ctags could parse every language professionally, as well as spawn a child process and get the raw data from stdout is not elegant. So I make a hybrid language parser, as you can see JS files look better because there is a specific parser for JS. When parsing an language, structure-view will find specific parser first, and then use ctags if specific parser is not existed.

image

Joinyy commented 7 years ago

You can add Latex to the List of supported languages, it works out of the box with ctags :+1:

Your Idea with ctags as backup solutions and own parsing for your most demanded languages is a nice idea.

edlongman commented 5 years ago

I would like to mention that someone has done a more complete Latex Viewer available here