oops we got off the list
---------- Forwarded message ---------
From: Lex Trotman <elextr(a)gmail.com>
Date: Fri, 27 Jan 2023 at 17:00
Subject: Re: [Geany-Devel] Re: bracket colors plugin
To: Asif Aaron Amin <asifamin(a)utexas.edu>
> I'm just about ready to make a pull request (learning autotools took longer than I'd like to admit 😅).
Well, you are ahead of me for autotools, I _refuse_ to learn it ;-P
> For my plugin, I'd like to ignore any brackets in strings, docstring, comments, etc.
> My naive approach was to hardcode the style numbers that correspond to comments, strings, etc. and just ignore brackets with those styles. This was fine for most C-like languages and Python (90% of what I use at my job) but when I was checking with other languages this didn't work well and in some languages most of the brackets would get ignored.
See `highlighting_is_comment_style()` `highlighting_is_string_style()`
and `highlighting_is_code_style()` which are all in the plugin API.
Hopefully that will make it simpler.
Whilst these may be inaccurate for obscure/new languages, fixing them
will then improve all uses (and its the responsibility of folks using
the language IMO, neither you nor Geany devs can be expected to be
experts in all languages).
First I'd like to thank you for developing Geany as it has been my
preferred IDE for 7 years due to how customizable and fast it
is, especially over ssh/X forwarding. I also use VS Code in certain
instances, and one of the features that I really wish was in Geany is the
bracket pair colorization. Has anyone proposed this or is currently working
on such functionality?
I decided to take a crack at implementing this into geany via a plugin
based on this blog post:
I got a simple a proof of concept working, basically using SCI_BRACEMATCH
with indicators that colored braces
Is this approach reasonable? I'm not sure how well this will scale on large
documents or if using indicators for this purpose is valid