From 1e59cc9d3f3951487ce1419b7904af2765bbc2cb Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 6 Jun 2013 20:08:59 -0400 Subject: Setting "style." properties updates styles immediately; doc/09_Themes.md Requires Scintillua r370. --- doc/09_Themes.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc/09_Themes.md') diff --git a/doc/09_Themes.md b/doc/09_Themes.md index 984afb14..b98d763c 100644 --- a/doc/09_Themes.md +++ b/doc/09_Themes.md @@ -61,6 +61,18 @@ settings. Tweaking themes is very simple with Lua's `dofile()` function. In your This loads Textadept's "light" theme, but applies your font preferences. The same technique works for tweaking individual theme colors and/or styles. +### Language-Specific + +Textadept also allows you to customize themes per-language through the +`events.LANGUAGE_MODULE_LOADED` event. For example, changing the color of +functions in Java from orange to black in the "light" theme looks like this: + + events.connect(events.LANGUAGE_MODULE_LOADED, function(lang) + if lang == 'java' then + buffer.property['style.function'] = 'fore:%(color.light_black)' + end + end) + ## GUI Theme There is no way to theme GUI controls like text fields and buttons from within -- cgit v1.2.3