A few months ago, somebody emailed me stating that they were working on this very thing. We were hoping to get his work integrated into RSTALanguageSupport at some point, but unfortunately I stopped hearing from him, and I can no longer find that email thread (!). In any case, I decided to dig into this myself. The good news is that Rhino has an incredibly easy-to-use API. I literally read no documentation at all – just Ctrl+Space’d and picked out the classes it looked like I needed. Fantastic! In a short while I already had squiggle underlining of syntax errors and working completion for functions and variables:
JS Code Completion - Day 1
It’ll look prettier when it’s done of course; this is without any polish. This will be made just as robust as the current Java language support, but with full syntax checking (Java currently doesn’t check for syntax errors in method bodies). This should include both an outline tree component as well as Go to Member support.
I should also hopefully get off my bum and get back to work on the Java support. When I do, I’ll be picking up where I left off, improving parameter completion (determining variables in scope of the right type/subtype for a parameter and suggesting them).