On 24 February 2013 10:30, Bob Furber burnsmicro@gmail.com wrote:
On 13-02-22 05:30 PM, Matthew Brush wrote:
Someone changed my wiki entry so the filetype is YAML instead of JavaScript[1]. Set it back to JavaScript and set the `[styling]` section back to `[styling=C]`, removing the partial set of styles added in that change and highlighting should work perfect (after all, isn't JSON valid JavaScript syntax?). You can check "Old Revisions" on the wiki to see the original entry and the additions later on.
Is the [1] in "instead of JavaScript[1]" significant?
I changed filetypes.JSON.conf to:
[styling=C] default=default number=number string=string word=word identifier=identifier,bold [keywords] primary=true false null [settings] extension=json lexer_filetype=Javascript comment_single=# comment_use_indent=true [indentation] width=2 # 0 is spaces, 1 is tabs, 2 is tab & spaces type=0
Syntax highlighting is still not so colourful: Names are bold black and values are normal black unless they are numbers, in which case they are green.
How colourful a language is depends on two things, how language constructs detected by the lexer map to styles, and what the colour scheme defines the style to be (colour, bold, italic, etc).
The former is saying *what* can be coloured and the latter *how* it will be coloured. The *what* is hard coded, and javascript and YAML have similar numbers of detected constructs, but they are different constructs.
The *how* is intended to be configurable by users by:
1) just select a new colour scheme menu->view->editor->colour schemes, Geany only comes with two (for now), but you can get heaps of *colourful* schemes here https://github.com/codebrainz/geany-themes
2) by making your own theme, see the manual and the wiki for how, and the themes above for examples (pick one, rename it and change the bits you don't like)
3) as a last resort by changing the styling section in your filetype file, but of course this will prevent it following the colour scheme.
Highlighting of matching '[' and '{' braces works fine after rebooting my PC.
Setting the filetype to Javascript (Document -> Set Filetype -> Scripting Languages -> Javascript) results in a more colourful display, but without any differentiation between names and values.
Is there any way of customizing this without launching a new career?
Some people have made a "career" out of creating themes :)
Cheers Lex
Please update the wiki if you find it's incorrect.
How do I do that?
Thanks,
RF
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users