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:
parent
cbe2c05bee
commit
fc344b67df
18
HACKING
18
HACKING
@ -302,18 +302,11 @@ When adding a lexer, update:
|
|||||||
For syntax highlighting, you will need to edit highlighting.c and add
|
For syntax highlighting, you will need to edit highlighting.c and add
|
||||||
the following things:
|
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
|
settings from the filetypes.foo configuration file. You should probably
|
||||||
start by copying and adapting another filetype's initialization, such
|
start by copying and adapting another filetype's initialization, such
|
||||||
as styleset_tcl_init(). Another way is to use load_style_entries()
|
as styleset_tcl_init(). Another way is to use load_style_entries()
|
||||||
to make style initialization simpler - see styleset_c_like_init().
|
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
|
2. Write styleset_foo() to apply styles when a new scintilla widget
|
||||||
is created. Again you could copy and adapt a function like
|
is created. Again you could copy and adapt a function like
|
||||||
styleset_tcl().
|
styleset_tcl().
|
||||||
@ -321,6 +314,15 @@ the following things:
|
|||||||
``init_styleset_case(GEANY_FILETYPES_FOO, styleset_foo_init);``.
|
``init_styleset_case(GEANY_FILETYPES_FOO, styleset_foo_init);``.
|
||||||
4. In highlighting_set_styles(), add
|
4. In highlighting_set_styles(), add
|
||||||
``styleset_case(GEANY_FILETYPES_FOO, styleset_foo);``.
|
``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
|
Error message parsing
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
Loading…
x
Reference in New Issue
Block a user