alibaba/structure-view

How to support additional languages?

DamnedScholar opened this issue · 5 comments

I thought I might take a crack at implementing Python, but I'm struggling to figure out how to get the package to recognize a new language. I made a python.js file with the obligatory parseFile(), that includes a Python-parsing library (sarama.js) and is supposed to spit out dummy content to the tree while giving me a log of the ast object so that I can take a look at it and see how it's built. However, when I toggle structure-view in my test Python file, it appears to load forever. What am I missing?

@DamnedScholar Sorry for replying late and it's really happy to see your try. I will give a code review for your work recently.

Hey @DamnedScholar
If your python.js doesn't work, would it be worth trying to implement ctags ? That could produce a better result thant what it actually does.

I was exploring this in order to move away from ctags-related packages, since it's cumbersome and confusing to use and doesn't actually provide much value to a novice user. My amateur impression is that ctags was a great code tool in the '90s; I felt like my time could be better spent in implementing a modern analysis library than in figuring out if I could bring ctags up to what I needed. After not receiving a response, I dropped this project. Very shortly thereafter, the atom-ide project was announced. I now use ide-python with the outline view built into atom-ide-ui and it works great.

I'm closing this issue since it's no longer relevant. The Language Server Protocol and the work performed by the Atom/Facebook collaboration have made code outlines more standardized and accessible across the board.

Atom-ide-ui outline doesn't work for me, it loads indefinitely

Then you should submit an issue on its repo.