Closed benogle closed 10 years ago
Note that we plan to remove the underlayer.
I've had a go at using the decoration API for this but it doesn't really work unless a fullHeight
and fullWidth
option is available.
It would also be nice to alter the style
of a region dynamically.
I'm not understanding why you need the fullHeight
or fullWidth
option. The line
type decorations are inherently full width. Also, the cursor line highlighting is already provided by core as a .cursor-line
class on the cursor's line.
An additional fullHeight
option would only be useful if you wanted to highlight a column.
Ah. I was using the highlight
type. I noticed that I can't pass multiple classes through but you can using the highlight
type.
I also agree on the style
property. We should allow for setting arbitrary styles on the decorations. Packages that do things like highlight hex colors in css files would definitely benefit.
Most of this functionality now exists in core. Each line the cursor is on gets a class of
cursor-line
(see theatom light
syntax theme for an example.As for orange borders around your selection, you should use decorations.
Removing code for the cursor line highlighting and using decorations for the selection outlines should substantially reduce code.