|
| From: | JD Smith |
| Subject: | Re: region-based face-remapping |
| Date: | Sat, 6 Jan 2024 09:56:08 -0500 |
Point taken. That said, I think my “at most a doubling” is a robust estimate, since it makes no sense to remap more face regions than there are in the buffer. But never underestimate the intrepid elisp programmer I suppose... I cannot be of more help here without understanding better what kinds This is because I was discussing a general feature that would be useful for more than my own application. To make it more concrete, what I had in mind is an update to indent-bars which would changes the appearance of the set of bars in a “scope” region via treesitter queries in a post-command hook. As point changes, the TS “enclosing scope” is calculated, and if it has changed, all the existing indent bars in that region would be updated with “alternate” styling (and formerly highlighted text would be returned to normal styling). See [1] for some images to give you the idea of how the normal styling can look. Important to note are that:
It could be a buffer-local variable, which defines the size of the Whether this makes sense depends on the applications you have in mind. Since there are many small stretches of text (single character stretches) that would be impacted over a larger region, I’m afraid such a simple approach wouldn’t work. In the world of CSS, you’d do this quite simply by (say) updating the class of the div which wraps your You are describing how to specify the effect, whereas I'm bothered by
I understand. The question is whether it would be desirable, tractable, performant, and maintainable to add any such infrastructure. Thanks for your thoughts and analysis. |
| [Prev in Thread] | Current Thread | [Next in Thread] |