Revision: 2984 http://geany.svn.sourceforge.net/geany/?rev=2984&view=rev Author: ntrel Date: 2008-09-23 11:25:23 +0000 (Tue, 23 Sep 2008)
Log Message: ----------- Move adding a lexer notes to 'Syntax highlighting' section; mention adding the LINK_LEXER command manually. Some minor edits (reST section grouping).
Modified Paths: -------------- trunk/ChangeLog trunk/HACKING
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-09-22 15:29:25 UTC (rev 2983) +++ trunk/ChangeLog 2008-09-23 11:25:23 UTC (rev 2984) @@ -1,3 +1,11 @@ +2008-09-23 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * HACKING: + Move adding a lexer notes to 'Syntax highlighting' section; mention + adding the LINK_LEXER command manually. + Some minor edits (reST section grouping). + + 2008-09-22 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/editor.c, src/ui_utils.c:
Modified: trunk/HACKING =================================================================== --- trunk/HACKING 2008-09-22 15:29:25 UTC (rev 2983) +++ trunk/HACKING 2008-09-23 11:25:23 UTC (rev 2984) @@ -2,7 +2,7 @@ --------------- This file contains information for anyone wanting to work on the Geany codebase. You should be aware of the open source licenses used - see -the README file or the documentation. +the README file or the documentation. It is pseudo-reStructuredText.
Writing plugins --------------- @@ -154,8 +154,8 @@ printf("Prefix: " GEANY_PREFIX); but instead use printf("Prefix: %s", GEANY_PREFIX);
-Adding a file foo.[hc] in src/ or plugins/ ------------------------------------------- +Adding a source file foo.[hc] in src/ or plugins/ +------------------------------------------------- Add foo.c, foo.h to SRCS in path/Makefile.am. Add foo.o to OBJS in path/makefile.win32. Add path/foo.c to po/POTFILES.in (for string translation). @@ -165,14 +165,6 @@ You can add a filetype without syntax highlighting or tag parsing, but check to see if those features have been written in other projects first.
-For syntax highlighting, it may be possible to use an existing Scintilla -lexer in the scintilla/ subdirectory - if not, you will need to find -(or write) one, LexFoo.cxx. Try the Scintilla project first. Remember -to update scintilla/Makefile.am and scintilla/makefile.win32. - -For tag parsing (e.g. for the symbol list), see 'Adding a TagManager -parser' below. - Add GEANY_FILETYPES_FOO to filetypes.h. Initialize GEANY_FILETYPES_FOO in init_builtin_filetypes() of filetypes.c. @@ -203,8 +195,17 @@
Syntax highlighting ^^^^^^^^^^^^^^^^^^^ +It may be possible to use an existing Scintilla lexer in the scintilla/ +subdirectory - if not, you will need to find (or write) one, +LexFoo.cxx. Try the Scintilla project first. When adding a lexer, update: + + * scintilla/Makefile.am + * scintilla/makefile.win32 + * scintilla/KeyWords.cxx - add a LINK_LEXER command *manually* + 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 settings from the filetypes.foo configuration file. You should probably start by copying and adapting another filetype's initialization, such @@ -232,9 +233,8 @@ If the Scintilla lexer supports user type keyword highlighting (e.g. SCLEX_CPP), update editor_lexer_get_type_keyword_idx() in editor.c.
- Adding a TagManager parser --------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^ This assumes the filetype for Geany already exists.
First write or find a CTags compatible parser, foo.c. Note that there
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.