qrush / sub

a delicious way to organize programs
http://37signals.com/svn/posts/3264-automating-with-convention-introducing-sub
MIT License
1.74k stars 148 forks source link

Documentation and opt-in autocomplete for other languages #14

Open chrisjaure opened 11 years ago

chrisjaure commented 11 years ago

I'm not sure there's much you can do here, but I've set up sub and created a javascript subcommand. To get automatic documentation and opt-in autocomplete, I had to make weird comments like

/*
# Usage: blah
*/

/*
# Provide sn completions
*/

because the comment syntax (#) is hard-coded. I realize this isn't a simple fix, but I thought I'd bring it up anyway.

Ideally, the language's comment syntax would be used so in javascript, I could just write:

/*
Usage: blah
*/

// Provide sub completions
qrush commented 11 years ago

Awesome! Yeah, I figured this would come up. We should just handle // as well as #.

markstos commented 1 year ago

I recommend closing this as "not doing". The "weird" syntax for nested JavaScript is not that bad, while making the "sub" project much simpler to not try to understand all the different possible comment formats.

@qrush has a decent middle-ground idea to just support // and # which supports a few popular languages without trying to support them all.