Update notes about data/filetypes.foo configuration file [styling] section.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4255 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2009-09-28 15:28:25 +00:00
parent cbe2c05bee
commit fc344b67df

18
HACKING
View File

@ -302,18 +302,11 @@ When adding a lexer, update:
For syntax highlighting, you will need to edit highlighting.c and add
the following things:
1. Write styleset_foo_init() to setup default styles and load style
1. Write styleset_foo_init() to setup lexer styles and load style
settings from the filetypes.foo configuration file. You should probably
start by copying and adapting another filetype's initialization, such
as styleset_tcl_init(). Another way is to use load_style_entries()
to make style initialization simpler - see styleset_c_like_init().
.. note::
Please try to make your styles fit in with the other filetypes' default
colors, and to use named styles where possible. Filetypes that share a
lexer should have the same colors. Normally, styles should leave the
background color empty to match the default color.
2. Write styleset_foo() to apply styles when a new scintilla widget
is created. Again you could copy and adapt a function like
styleset_tcl().
@ -321,6 +314,15 @@ the following things:
``init_styleset_case(GEANY_FILETYPES_FOO, styleset_foo_init);``.
4. In highlighting_set_styles(), add
``styleset_case(GEANY_FILETYPES_FOO, styleset_foo);``.
5. Write data/filetypes.foo configuration file [styling] section. See
the manual and see data/filetypes.d for a named style example.
.. note::
Please try to make your styles fit in with the other filetypes'
default colors, and to use named styles where possible (e.g.
"commentline=comment"). Filetypes that share a lexer should have
the same colors. If not using named styles, leave the background color
empty to match the default color.
Error message parsing
^^^^^^^^^^^^^^^^^^^^^