[scintilla:feature-requests] #1577 Inline annotation with syntax coloring

0 views
Skip to first unread message

yonken

unread,
Feb 1, 2026, 5:03:40 AMFeb 1
to scintill...@googlegroups.com

[feature-requests:#1577] Inline annotation with syntax coloring

Status: open
Group: Initial
Labels: annotation inline
Created: Sun Feb 01, 2026 10:03 AM UTC by yonken
Last Updated: Sun Feb 01, 2026 10:03 AM UTC
Owner: nobody
Attachments:

It's the idea from the so-called "inline suggestion" feature where it shows code insertion hint right after the caret. This may be something like a combination of EOL annotation + normal multi-line annotation, but with syntax coloring (probably dimmed?).


Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/feature-requests/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

Neil Hodgson

unread,
Feb 1, 2026, 4:06:29 PMFeb 1
to scintill...@googlegroups.com
  • Comment:

Styling of annotations is possible with SCI_ANNOTATIONSETSTYLES and the same feature could be implemented for EOL annotations since they share code.

This still requires choosing styles, perhaps by lexing in an invisible document+window or preparing before hand in a configuration file.

Perhaps first try a single inline annotation with both pieces of text to see how it works before the more complex work of adding styling to EOL annotations. It should be possible to produce the simplified feature just with client application code.

yonken

unread,
Feb 1, 2026, 9:34:00 PMFeb 1
to scintill...@googlegroups.com

My experience with EOL annotation is that it always has one space before the annotation, it would be nicer if that space can be optionally removed to better create the "inline" effect.

Based on your comment, my understanding is that for now I can try to produce the feature with a EOL annotation (but without syntax color). When there's multiple line of text, I will also need a few more SCI_ANNOTATIONSETTEXT.

I understand this may require more hard work, but still it would be nice to have this as an infrastructure feature built in scintilla.


[feature-requests:#1577] Inline annotation with syntax coloring

Status: open
Group: Initial
Labels: annotation inline
Created: Sun Feb 01, 2026 10:03 AM UTC by yonken

Last Updated: Sun Feb 01, 2026 09:06 PM UTC
Owner: nobody
Attachments:

Neil Hodgson

unread,
Feb 3, 2026, 5:01:07 PMFeb 3
to scintill...@googlegroups.com

My experience with EOL annotation is that it always has one space before the annotation, it would be nicer if that space can be optionally removed to better create the "inline" effect.

There is an 'end-of-line-selection' space after the last character on a line. If you select over the line end (such as selecting two lines) that space shows the selection background colour. While the size of that space could be modifiable, setting to zero or very small would affect other lines in a way that would likely confuse users. Moving that space after the EOL annotation would mean that it is less likely to be visible as EOL annotations often continue past the left edge of the window. There is already a proposal to set the width [feature-requests:#1356]. Perhaps there could be a choice on each EOL annotation to eliminate the space just on that line.

Another approach would be to implement 'virtual text' that can add text at any point in the document. Unfortunately, implementing this is complex and difficult. [feature-requests:#969]

I understand this may require more hard work, but still it would be nice to have this as an infrastructure feature built in scintilla.

This appears to me to be a feature that is partly implemented in Scintilla and partly in the application and the subdivision of the feature into the pieces on each side and the shape of the boundary will be the main task. Scintilla commonly implements small features that can be combined into larger user-level features by the application.

This feature request includes 'syntax coloring' but a full implementation is outside the scope of Scintilla and likely needs orchestrating by the application. A more implementable item would be 'styled text' as is described for SCI_ANNOTATIONSETSTYLES.


[feature-requests:#1577] Inline annotation with syntax coloring

Status: open
Group: Initial
Labels: annotation inline
Created: Sun Feb 01, 2026 10:03 AM UTC by yonken

Last Updated: Mon Feb 02, 2026 02:33 AM UTC
Owner: nobody
Attachments:

yonken

unread,
Feb 10, 2026, 11:17:37 PMFeb 10
to scintill...@googlegroups.com

I just did a simple test with a pseudocode, then realized that or tab \t seems to be removed or not drawn. This will be a problem for inline completion.
Then I also had an idea: what if scintilla can simply allow me to draw custom annotation content?
We call a function in scintilla to allocate for an annotation space for EOL and lines below it, and we provide a call back or something that can be invoked when needed to paint whatever content we want. Then in theory we can create a hidden scintilla editor, set the text and apply styling, then print it to the space with given drawn context.


[feature-requests:#1577] Inline annotation with syntax coloring

Status: open
Group: Initial
Labels: annotation inline
Created: Sun Feb 01, 2026 10:03 AM UTC by yonken

Last Updated: Tue Feb 03, 2026 10:00 PM UTC
Owner: nobody
Attachments:

yonken

unread,
Feb 10, 2026, 11:17:49 PMFeb 10
to scintill...@googlegroups.com

I just did a simple test with a pseudocode, then realized that or tab \t seems to be removed or not drawn. This will be a problem for inline completion.
Then I also had an idea: what if scintilla can simply allow me to draw custom annotation content?
We call a function in scintilla to allocate for an annotation space for EOL and lines below it, and we provide a call back or something that can be invoked when needed to paint whatever content we want. Then in theory we can create a hidden scintilla editor, set the text and apply styling, then print it to the space with given drawn context.

[feature-requests:#1577] Inline annotation with syntax coloring

Status: open
Group: Initial
Labels: annotation inline
Created: Sun Feb 01, 2026 10:03 AM UTC by yonken

Last Updated: Wed Feb 11, 2026 04:17 AM UTC
Owner: nobody
Attachments:

Neil Hodgson

unread,
Feb 11, 2026, 5:07:06 PMFeb 11
to scintill...@googlegroups.com

Then I also had an idea: what if scintilla can simply allow me to draw custom annotation content?
We call a function in scintilla to allocate for an annotation space for EOL and lines below it, and we provide a call back or something that can be invoked when needed to paint whatever content we want.

Over time, Scintilla's drawing subsystem has evolved towards greater modularity to try to allow adding new independent features more easily. New features, however, tend to require access to significant contextual data in ways that were not envisioned by the design hence requiring infrastructure work. Putting new feature code in a callback moves it further away from potential context data leading to new requirements on the callback mechanism and heavy support costs. It also makes it more difficult to implement new drawing techniques like multi-threading and better scaling support.

It you want to have your application perform drawing, then it should use independent windows.

Neil Hodgson

unread,
Feb 11, 2026, 5:07:36 PMFeb 11
to scintill...@googlegroups.com

Why is this a problem?


[feature-requests:#1577] Inline annotation with syntax coloring

Status: open
Group: Initial
Labels: annotation inline
Created: Sun Feb 01, 2026 10:03 AM UTC by yonken

Last Updated: Wed Feb 11, 2026 10:07 PM UTC
Owner: nobody
Attachments:

yonken

unread,
Feb 11, 2026, 8:42:56 PMFeb 11
to scintill...@googlegroups.com

Since tabs are not expanded, I have no idea how to implement the inline completion effect as shown in the InlineAnnotation.png...

Neil Hodgson

unread,
Feb 13, 2026, 3:43:04 PMFeb 13
to scintill...@googlegroups.com

Tabs can be replaced with spaces.


[feature-requests:#1577] Inline annotation with syntax coloring

Status: open
Group: Initial
Labels: annotation inline
Created: Sun Feb 01, 2026 10:03 AM UTC by yonken

Last Updated: Thu Feb 12, 2026 01:42 AM UTC
Owner: nobody
Attachments:

Reply all
Reply to author
Forward
0 new messages