Re: [code] Highlighting questions

From: Christian Gelinek <cgelinek.att.radlogic.com.au>
Date: Wed, 6 May 2020 12:18:43 +0930

On 2/5/20 4:22 am, Mitchell wrote:

> On Fri, 1 May 2020, Christian Gelinek wrote:
>> 2. Can we have multiple simultaneous highlights with different colours
>>   for different (parts of) words?
>
> You'd have to code this up on your own, but it's possible.
> *modules/textadept/editing.lua*'s `textadept.editing.highlight_word()`
> is a starting point of how you might go about doing this.

Thanks for the pointer, if I find time to work this out, I'll be sure to
share it here.

>> 3. Can other occurrences of the currently selected word be (slightly)
>>   highlighted?
>
> `textadept.editing.highlight_word()` does the highlighting of selected
> words; you'd just have to change the color to be more "slightly
> highlighted". `textadept.editing.INDIC_HIGHLIGHT` is the indicator
> you'd want to change the color of.

Hmm, there already appears to be some configuration present:

buffer.indic_fore[textadept.editing.INDIC_HIGHLIGHT] = 56575
buffer.indic_alpha[textadept.editing.INDIC_HIGHLIGHT] = 255
buffer.indic_style[textadept.editing.INDIC_HIGHLIGHT] = 7

I interpret this as colour 0x00dcff (a bright cyan), fully opaque
<https://foicica.com/textadept/api.html#buffer.indic_fore>,
INDIC_ROUNDBOX
<https://foicica.com/textadept/api.html#buffer.indic_style> style, but I
must be missing something as I can't see any such highlights on words
that equal the selected one.

Here is a screenshot with the word "editing" on line 2 selected:

Regards,
Christian

-- 
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 Tue 05 May 2020 - 22:48:43 EDT

This archive was generated by hypermail 2.2.0 : Wed 06 May 2020 - 06:43:53 EDT