Re: [code] Code annotations

From: Mitchell <>
Date: Wed, 6 Mar 2013 09:33:35 -0500 (Eastern Standard Time)

Hi Michael,

On Wed, 6 Mar 2013, Michael Richter wrote:

> If one wanted to make a plug-in that annotated the "gutter" with symbols
> based on the state of the line of code at that point (like the fold
> markers, but not for folding), which APIs would one use? I'm digging
> through the LuaDocs and still can't quite figure out which ones would be
> relevant.

The Scintilla documentation[1] may help here. First you need to define a
marker with buffer:marker_define*(). Examples are in the view.lua in
themes. Then you should decide which marker margin you'd like to use
(0-4). 0 is used for line numbers and 2 is used for fold markers. 1 is
hidden by default but probably useful for your case. 3-4 are unused and
hidden. Unhide a margin with buffer.margin_width_n[i] by setting the width
in pixels. Again, examples in view.lua. Then you can set marker properties
with buffer.marker_* before actually "annotating" the lines with
buffer:marker_add*(). modules/textadept/bookmarks.lua has some additional

I've been planning a scripting guide for some time now that groups
together the API functions. Hopefully I'll find the time.



You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 06 Mar 2013 - 09:33:35 EST

This archive was generated by hypermail 2.2.0 : Thu 07 Mar 2013 - 06:47:28 EST