To modify colors and appearance of text, markers, or indicators in the editor and Output/Console panels, you can use these commands and apply them as described in the configuration section and as shown in user-sample.lua.
Example
The following configuration will set text background to be light red: styles.text = {bg = {250,200,200}}
.
Style attributes
fg
: foreground; a table with three color components{red,green,blue}
(0-255)bg
: background; a table with three color components{red,green,blue}
(0-255)alpha
: translucency; 0-255 (0 - transparent, 255 - opaque, 256 - opaque/faster)sel
: color of the selected block (only applies to folds);{red,green,blue}
(0-255)u
: underline; boolean valueb
: bold; boolean valuei
: italic; boolean valuefill
: fill to the end of line; boolean valuefn
: font face name; string (“Lucida Console”)fs
: font size; number (11)
Style elements
See style.lua for the complete list of elements and tomorrow.lua for an example of how these elements can be used.
Note that while many of the colors are configurable, some of the colors (the color of the status bar, the toolbar background, and the borders between panels) are controlled by the OS color scheme.
(v0.50+) alpha
attribute is supported for sel
, seladd
, and caretlinebg
style elements.
Indicators
(v0.38+) Indicators add visual elements to the text in the editor, for example, a dotted underline for local variables or a solid line for global ones.
styles.indicator.fncall
: function callstyles.indicator.varlocal
: local variablestyles.indicator.varglobal
: global variablestyles.indicator.varmasking
: masking variable – a local variable masking another variable in the same blockstyles.indicator.varmasked
: masked variable – a local variable being masked by another variable in the same blockstyles.indicator.varself
: implicitself
variable used in functions defined with colon syntax (v1.61+)
You can change the color of an indicator (by setting its fg
property), its type (by setting its st
property) or disable it by setting its value to nil
:
styles.indicator.fncall = {st = wxstc.wxSTC_INDIC_PLAIN, fg = {240,0,0}}
: set color and typestyles.indicator.fncall = {fg = {240,0,0}}
: set colorstyles.indicator.fncall = nil
: disable the indicator
If you want to disable an indicator, set its value to nil
: styles.indicator.varlocal = nil
.
If you want to disable all indicators, use styles.indicator = {}
.
Indicator types
The following list shows possible indicator types:
wxstc.wxSTC_INDIC_DOTS
: Dotted underlinewxstc.wxSTC_INDIC_PLAIN
: Single-line underlinewxstc.wxSTC_INDIC_TT
: Line of T-shapeswxstc.wxSTC_INDIC_STRIKE
: Strike-outwxstc.wxSTC_INDIC_SQUIGGLE
: Squiggly underlinewxstc.wxSTC_INDIC_SQUIGGLELOW
: Squiggly underline (2 pixels)wxstc.wxSTC_INDIC_SQUIGGLEPIXMAP
: Similar toINDIC_SQUIGGLE
, but draws a pixmap instead of a series of line segments for performance (v1.40+)wxstc.wxSTC_INDIC_BOX
: Boxwxstc.wxSTC_INDIC_ROUNDBOX
: Rounded Boxwxstc.wxSTC_INDIC_STRAIGHTBOX
: Box with trasparencywxstc.wxSTC_INDIC_DOTBOX
: Dotted rectanglewxstc.wxSTC_INDIC_FULLBOX
: Rectangle around the text using translucent drawing similar toINDIC_STRAIGHTBOX
but covering the entire character area (v1.40+)wxstc.wxSTC_INDIC_DASH
: Dashed underlinewxstc.wxSTC_INDIC_DIAGONAL
: Diagonal hatchingwxstc.wxSTC_INDIC_TEXTFORE
: Changes the colour of the text (v1.40+)wxstc.wxSTC_INDIC_HIDDEN
: No visual effect
See Scintilla documentation for indicator style examples.
Color schemes
Color schemes allow configuring colors and attributes in coordinated set. See tomorrow.lua for an example of how these colors and attributes can be manipulated, scheme-picker.lua for how they can be used, and user-sample.lua for how a color scheme can be configured.