From 584e580c2213f91a17425be10d57aa5bd2f3d509 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 7 Jul 2020 21:02:07 -0400 Subject: Added `lexer.colors` and `lexer.styles` and updated themes to utilize them. This allows for a more Lua table-oriented approach to defining and using colors and styles, instead of manually manipulating Scintilla property strings. Themes are still backwards compatible, as the underlying mechanisms are still in place. --- core/.view.luadoc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'core/.view.luadoc') diff --git a/core/.view.luadoc b/core/.view.luadoc index 4196200b..8b24e3d8 100644 --- a/core/.view.luadoc +++ b/core/.view.luadoc @@ -1447,15 +1447,17 @@ function unsplit(view) end function goto_buffer(view, buffer) end --- --- Sets the view's color theme to be string *name* and (optionally) assigns --- the properties contained in table *props*. +-- Sets the view's color theme to be string *name*, with the contents of table +-- *options* available as global variables. -- User themes override Textadept's default themes when they have the same name. -- If *name* contains slashes, it is assumed to be an absolute path to a theme -- instead of a theme name. -- @param view A view. -- @param name The name or absolute path of a theme to set. --- @param props Optional table of theme property assignments that override the --- theme's defaults. --- @usage view:set_theme('light', {font = 'Monospace', fontsize = 12}) +-- @param options Optional table of global variables themes can utilize to +-- override default settings such as font and size. +-- @usage view:set_theme('light', {font = 'Monospace', size = 12}) -- @name set_theme -function set_theme(view, name, props) end +-- @see _G.lexer.colors +-- @see _G.lexer.styles +function set_theme(view, name, options) end -- cgit v1.2.3