Hirse / brackets-outline-list

Extension for Brackets and Phoenix to display a list of the functions or definitions in the currently opened document.
MIT License
79 stars 30 forks source link

Support suggestion for Stylus #14

Closed renanveroneze closed 8 years ago

renanveroneze commented 9 years ago

I could not understand how to make a plugin for the Outline. So, I opened this issue, as Stylus use, like to have the features as css.

Thanks =D

Hirse commented 9 years ago

Honestly this doesn't really have the highest priority right now, as the language isn't even supported by Brackets. I might look into it in January when I am back from my vacation. In the meantime feel free to submit a PR, I might be able to review that earlier. To add support for another language, you would need to find a Regex that detects those language's definitions. The rest could maybe copied from existing languages. (same goes for #15)

Jonatthu commented 9 years ago

Stylus and Jade are important now!(: Please how can we colaborate with you for do this real?

Hirse commented 9 years ago

For Stylus you could have a look at the CSS outline module and adapt it to the language. Based on a first look at Stylus, it seems a bit complicated to parse as many things are optional and can be written in multiple ways. It would be fine by me if we only support one way for now, so for example either always require braces or always omit them.

For Jade, probably the HTML/XML outline module would work best as a starting point. If I understand the language correctly (again based on a very quick glance on the example on their website), Jade mostly works with indentations. That would make creating an outline somewhat easier as the necessary regex should be simple.

Jonatthu commented 9 years ago

Okey, then, do you have facebook or something for chat and make this happen? I will help you with that, or some other idea?

Hirse commented 9 years ago

I have created the basic infrastructure for Jade and Stylus on a separate branch jade/stylus. Have a look at the test files that I used for reference and also at the js files creating the outline. Please expand the logic and the regex if necessary.

Hirse commented 8 years ago

Merged in eb037261945d5d730bf171297f793a06d9aae9d0.