diff options
author | 2020-05-25 21:16:01 -0400 | |
---|---|---|
committer | 2020-05-25 21:16:01 -0400 | |
commit | f2374c4aba53fa462dc88d4104e10d8cb97e61ba (patch) | |
tree | 5e5a9d26a5ad8915c0e12187dd059b1109fcf22d /themes/light.lua | |
parent | effc636745e8d9c680c3acf42e8e25eed10cd903 (diff) |
Allow views to be used as buffers and update API.
This allows for a superficial separation of buffer- and view-specific Scintilla
functionality. buffers and views can now be used interchangeably for the most
part, and the APIs are guidance, not hard requirements. User scripts do not
require any modification and will continue to function normally.
Diffstat (limited to 'themes/light.lua')
-rw-r--r-- | themes/light.lua | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/themes/light.lua b/themes/light.lua index 48c3912a..d72a85f9 100644 --- a/themes/light.lua +++ b/themes/light.lua @@ -2,7 +2,7 @@ -- Light theme for Textadept. -- Contributions by Ana Balan. -local buffer = buffer +local buffer, view = buffer, view local property, property_int = buffer.property, buffer.property_int -- Greyscale colors. @@ -88,50 +88,50 @@ property['style.variable'] = 'fore:$(color.dark_lavender)' property['style.whitespace'] = '' -- Multiple Selection and Virtual Space ---buffer.additional_sel_alpha = ---buffer.additional_sel_fore = ---buffer.additional_sel_back = ---buffer.additional_caret_fore = +--view.additional_sel_alpha = +--view.additional_sel_fore = +--view.additional_sel_back = +--view.additional_caret_fore = -- Caret and Selection Styles. -buffer:set_sel_fore(true, property_int['color.light_black']) -buffer:set_sel_back(true, property_int['color.light_grey']) ---buffer.sel_alpha = -buffer.caret_fore = property_int['color.grey_black'] -buffer.caret_line_back = property_int['color.dark_white'] ---buffer.caret_line_back_alpha = +view:set_sel_fore(true, property_int['color.light_black']) +view:set_sel_back(true, property_int['color.light_grey']) +--view.sel_alpha = +view.caret_fore = property_int['color.grey_black'] +view.caret_line_back = property_int['color.dark_white'] +--view.caret_line_back_alpha = -- Fold Margin. -buffer:set_fold_margin_colour(true, property_int['color.white']) -buffer:set_fold_margin_hi_colour(true, property_int['color.white']) +view:set_fold_margin_colour(true, property_int['color.white']) +view:set_fold_margin_hi_colour(true, property_int['color.white']) -- Markers. local MARK_BOOKMARK, t_run = textadept.bookmarks.MARK_BOOKMARK, textadept.run ---buffer.marker_fore[MARK_BOOKMARK] = property_int['color.white'] -buffer.marker_back[MARK_BOOKMARK] = property_int['color.dark_blue'] ---buffer.marker_fore[t_run.MARK_WARNING] = property_int['color.white'] -buffer.marker_back[t_run.MARK_WARNING] = property_int['color.light_yellow'] ---buffer.marker_fore[t_run.MARK_ERROR] = property_int['color.white'] -buffer.marker_back[t_run.MARK_ERROR] = property_int['color.light_red'] +--view.marker_fore[MARK_BOOKMARK] = property_int['color.white'] +view.marker_back[MARK_BOOKMARK] = property_int['color.dark_blue'] +--view.marker_fore[t_run.MARK_WARNING] = property_int['color.white'] +view.marker_back[t_run.MARK_WARNING] = property_int['color.light_yellow'] +--view.marker_fore[t_run.MARK_ERROR] = property_int['color.white'] +view.marker_back[t_run.MARK_ERROR] = property_int['color.light_red'] for i = buffer.MARKNUM_FOLDEREND, buffer.MARKNUM_FOLDEROPEN do -- fold margin - buffer.marker_fore[i] = property_int['color.white'] - buffer.marker_back[i] = property_int['color.grey'] - buffer.marker_back_selected[i] = property_int['color.grey_black'] + view.marker_fore[i] = property_int['color.white'] + view.marker_back[i] = property_int['color.grey'] + view.marker_back_selected[i] = property_int['color.grey_black'] end -- Indicators. -buffer.indic_fore[ui.find.INDIC_FIND] = property_int['color.yellow'] -buffer.indic_alpha[ui.find.INDIC_FIND] = 255 +view.indic_fore[ui.find.INDIC_FIND] = property_int['color.yellow'] +view.indic_alpha[ui.find.INDIC_FIND] = 255 local INDIC_BRACEMATCH = textadept.editing.INDIC_BRACEMATCH -buffer.indic_fore[INDIC_BRACEMATCH] = property_int['color.grey'] +view.indic_fore[INDIC_BRACEMATCH] = property_int['color.grey'] local INDIC_HIGHLIGHT = textadept.editing.INDIC_HIGHLIGHT -buffer.indic_fore[INDIC_HIGHLIGHT] = property_int['color.orange'] -buffer.indic_alpha[INDIC_HIGHLIGHT] = 255 +view.indic_fore[INDIC_HIGHLIGHT] = property_int['color.orange'] +view.indic_alpha[INDIC_HIGHLIGHT] = 255 local INDIC_PLACEHOLDER = textadept.snippets.INDIC_PLACEHOLDER -buffer.indic_fore[INDIC_PLACEHOLDER] = property_int['color.grey_black'] +view.indic_fore[INDIC_PLACEHOLDER] = property_int['color.grey_black'] -- Call tips. -buffer.call_tip_fore_hlt = property_int['color.light_blue'] +view.call_tip_fore_hlt = property_int['color.light_blue'] -- Long Lines. -buffer.edge_colour = property_int['color.grey'] +view.edge_colour = property_int['color.grey'] |