aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/.view.luadoc
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-07-07 21:02:07 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-07-07 21:02:07 -0400
commit584e580c2213f91a17425be10d57aa5bd2f3d509 (patch)
treef47ca2ee2a85bcfba437ddd989b27284827c542c /core/.view.luadoc
parent021866de868fd074526fc63270639ec2f3ce9aa5 (diff)
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.
Diffstat (limited to 'core/.view.luadoc')
-rw-r--r--core/.view.luadoc14
1 files changed, 8 insertions, 6 deletions
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