[Geany] How to get syntax highlighting of the Compiler window in the Edit window

Lex Trotman elextr at xxxxx
Wed Aug 29 11:37:08 UTC 2012


On 29 August 2012 20:51, John Yeung <gallium.arsenide at gmail.com> wrote:
> On Wed, Aug 29, 2012 at 5:17 AM, Lex Trotman <elextr at gmail.com> wrote:
>> The highlighting in the edit window is provided by the Scintilla
>> editing components lexers.  There is not a lexer for decoding and
>> highlighting compiler errors.
>
> Are you sure?  I use SciTE, and its output pane does have highlighting
> done by Scintilla.  I have done practically no Geany configuration, so
> I don't know how you would "port" these settings (and in fact there
> may be some things that are SciTE-specific, and thus not portable to
> Geany), but what SciTE has in its others.properties file is
>
> *** begin excerpts ***
>
> lexer.*.err=errorlist
>
> # Error list styles
>
> style.errorlist.32=fore:#B06000,$(font.small)
> # Default
> style.errorlist.0=fore:#000000
> # python Error
> style.errorlist.1=fore:#FF0000
> # gcc Error
> style.errorlist.2=fore:#800080
> # Microsoft Error
> style.errorlist.3=fore:#808000
> # command or return status
> style.errorlist.4=fore:#0000FF
> # Borland error and warning messages
> style.errorlist.5=fore:#B06000
> # perl error and warning messages
> style.errorlist.6=fore:#FF0000
> # .NET tracebacks
> style.errorlist.7=fore:#FF0000
> # Lua error and warning messages
> style.errorlist.8=fore:#FF0000
> # ctags
> style.errorlist.9=fore:#FF00FF
> # diff changed !
> style.errorlist.10=fore:#007F00
> # diff addition +
> style.errorlist.11=fore:#00007F
> # diff deletion -
> style.errorlist.12=fore:#007F7F
> # diff message ---
> style.errorlist.13=fore:#7F0000
> # PHP error
> style.errorlist.14=fore:#FF0000
> # Essential Lahey Fortran 90 error
> style.errorlist.15=fore:#FF0000
> # Intel Fortran Compiler error
> style.errorlist.16=fore:#FF0000
> # Intel Fortran Compiler v8.0 error/warning
> style.errorlist.17=fore:#FF0000
> # Absoft Pro Fortran 90/95 v8.2 error or warning
> style.errorlist.18=fore:#FF0000
> # HTML Tidy
> style.errorlist.19=fore:#FF0000
> # Java runtime stack trace
> style.errorlist.20=fore:#FF0000
> # Text matched with find in files and message part of GCC errors
> style.errorlist.21=fore:#000000
> # Ensures that spacing is not affected by line number styles
> style.errorlist.33=$(font.small)
>
> lexer.errorlist.value.separate=1
>
> *** end excerpts ***
>
> So I'd bet there is some way you can leverage Scintilla to do this in Geany.

Ok, its hidden away in LexOthers.cxx, so as there is a lexer in
Scintilla and its actually in Geany, but it doesn't have the
highlighting mapping or a filetype for it, you would need to create
those (see HACKING).

One potential problem is that Geany error message recognition is
different (and user settable), so you might not get the same messages
being recognised but it would probably be ok for the most common
compilers.

We don't use a scintilla window because we have the click on a red
error message and go to the line in the file capability as well as the
above mentioned user settable recognition.

Cheers
Lex

>
> Cheers,
> John
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany



More information about the Users mailing list