Re: [code] [textadept] New Theme and Settings Proposal

From: Robert <>
Date: Sat, 18 May 2013 11:33:33 +0200

Hi Mitchell,

On Fri, May 17, 2013 at 7:30 AM, Mitchell <> wrote:
> I've been working on a new implementation for themes and settings and have
> something workable that I'd like to share as a proposal.

like everyone else I am very happy about the general direction of this.
Some thoughts and ideas below.

> Similarly I could tweak the default font and keep everything else the same:
> dofile(_HOME..'/themes/light.lua')
> local style =['style.default']
> style = style..',font:DejaVu Sans Mono,size:11'
>['style.default'] = style
> In either case, I now add the following to my *~/.textadept/init.lua*:
> gui.set_theme('light')

Would it somehow be possible to change fonts even more easily? For
example globale variables
_FONT = 'DejaVu Sans Mono'
to be set in *init.lua*?
Another option could be saving them along with the theme name in *theme*:
-- Contents of theme:
DejaVu Sans Mono

> So what about the old view.lua and buffer.lua? Are they still grouped in
> with themes? No :) Textadept has a new *settings.lua* that contains all
> non-color buffer properties.

How about calling it *properties.lua*? 'Buffer properties' and 'view
properties' are already established terms in the manual and (to me at
least) 'properties' sounds less "general" than 'settings'.
Also, have you considered just using events? Or is this not possible,
does *settings.lua* somehow need to be loaded from the lexer side as
Changeset 1439 [1] introduces using events for setting the language
module specific properties so this would fit in nicely. It could be
bound to a THEME_SET event or something (to avoid the buffer and view
specific distinction).

> Thoughts and suggestions are very welcome.
In general I would prefer a more Lua-ish way of describing the theme
styles as already suggested by Gilles.



You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sat 18 May 2013 - 05:33:33 EDT

This archive was generated by hypermail 2.2.0 : Sat 18 May 2013 - 06:31:41 EDT