RSTALanguageSupport Progress

The RSTALangaugeSupport library I’ve blogged about for so long has finally been added to the Subversion repository, but do note that it isn’t ready for prime time yet.  Use it at your own risk!  And send feedback when you do!  :)

If you check out the project, please read the readme file first.  It’s fairly up to date and explains how to compile and use the library.

The library currently includes code completion for the standard C library, and despite a couple of rough edges, should be mostly complete:

C code completion

C code completion

C support takes advantage of the parameter assistance feature of the AutoComplete library as well:

Parameter assistance for C functions

Parameter assistance for C functions

There’s also the start of decent support for Java, which is much more robust and dynamic than the support for other languages such as C.  It actually evaluates your code when you hit ctrl+space, and gives you accurate completion choices based on your current location in the code, based on classes you’ve imported (referencing jars on your “classpath”), local variables if you’re in a method, etc.  This has been discussed in several previous blog posts.

Java code completion

Java code completion

Yes, that tree widget on the left is actually included in RSTALanguageSupport as well!  However, it is currently Java-specific, and will not display an outline of source code in any other language.  It’s not high priority at the moment to generalize it, but it should probably happen sooner or later.  Java also supports parameter assistance when completing methods, like C does with its standard library.

There’s also code completion for Perl, supporting all built-in functions in Perl 5.10.x.  Rudimentary support for completions of variable names will appear for Perl in the next couple of days.

Perl code completion

Perl code completion

There’s also excellent support for HTML 5 – completion for all valid tag names, and attributes are suggested as well (only those attributes valid for the tag they are describing).  The description information displayed in the tool tip-style side window is rather lacking, however (as you can tell from the screenshot), so help improving this documentation is more than welcome!

HTML Completion

HTML Completion

PHP code completion is also included.  It uses the built-in HTML support when editing HTML, but when the caret is within PHP tags, PHP functions are suggested instead.  There is no documentation for PHP functions in the description window like there is for other languages just yet.

PHP code completion

PHP code completion

Similar to the C and Java support, parameter assistance is included for PHP functions:

Parameter assistance for PHP

Parameter assistance for PHP

Hopefully that is enough to whet some appetites!  Please discuss and ask questions over in the forums.

3 Responses to “RSTALanguageSupport Progress”

  1. [...] RSTALanguageSupport library is already taking advantage of this new feature.  The Java, HTML, and PHP supports all now [...]

  2. [...] first item is already practically done.  I’ve integrated RSTALanguageSupport via a plugin.  I’ve still got a couple more ideas for the latter two items before 1.2 is [...]

  3. [...] added to the Perl Language Support in RSTALanguageSupport is the ability to modify the value of the PERL5LIB environment variable used when syntax-checking [...]