Re: [code] [textadept] Theme enhancements in hg

From: Mitchell <>
Date: Wed, 15 Jul 2020 10:05:18 -0400 (EDT)

Hi Robert,

On Wed, 15 Jul 2020, Robert Gieseke wrote:

> On 15.07.20 15:41, Robert Gieseke wrote:
>> On 15.07.20 15:01, Mitchell wrote:
>>> Are you asking if there's a way to override colors and styles from the table? If so, there isn't one. I wasn't aware that was a thing.
>> I was thinking of changes like this:
>> events.connect(events.LEXER_LOADED, function(lexer)
>> if lexer ~= 'java' then return end
>> local default_fore = view.style_fore[view.STYLE_DEFAULT]
>> view.style_fore[buffer:style_of_name('function')] = default_fore
>> end)
>> Does that only work with LEXER_LOADED?
> In 10.8 i can style the line number margin like this:
> if not CURSES then
> buffer:set_theme('dark', {
> ['style.linenumber'] = 'fore:%(,back:%(color.yellow)',
> })
> end

Fair enough. With my recent changes, I'm trying to move away from magic properties and strings with magic formatting. You can write a theme that checks for global color names and styles first before setting defaults. Then you can pass that information to your theme via the table. (This is what happens with `font` and `size` in Textadept's default themes. I'll consider looking into a more generic way of doing this, but it's not a high priority since there's already ways of doing these kinds of overrides.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 15 Jul 2020 - 10:05:18 EDT

This archive was generated by hypermail 2.2.0 : Thu 16 Jul 2020 - 06:36:08 EDT