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

From: Mitchell <m.att.foicica.com>
Date: Wed, 15 Jul 2020 14:44:41 -0400 (EDT)

Hi Robert,

On Wed, 15 Jul 2020, Robert Gieseke wrote:

> On 15.07.20 16:05, Mitchell wrote:
>
>>>
>>> In 10.8 i can style the line number margin like this:
>>>
>>> if not CURSES then
>>> buffer:set_theme('dark', {
>>> ['style.linenumber'] = 'fore:%(color.red),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.
>>
>
> Alright, the `lexer` not yet being loaded was what i was missing!

Okay. By the way, until I check in some changes, you'll need `local lexer = require('lexer')` to access `lexer.colors` and `lexer.styles` outside of themes. It will eventually be a global.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 15 Jul 2020 - 14:44:41 EDT

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