Open deathaxe opened 7 years ago
This issue should be extended to include text highlight priority. Both text highlight and gutter icon are set by the add_regions
command. In both cases, priority conflicts occur. The proposed solution may work for the problem of colliding text highlights as well.
In Issue #319 several possible improvements to the gutter area are discussed. Some of them may need heavy code changes to be supported and thus still not done. I don't want to continue the discussion of the locked thread here, but ask for a change which might be possible with little effort.
Sublime Text seems basically able to handle multiple icons at a line. There are many cases where icons are replaced by each other, well. The only question is - who decides which one to show? There seems no algorithm at the moment?
The
view.add_regions(key, [regions], <scope>, <icon>, <flags>)
useskey
to identify the icons added to the gutter area.How about using
key
as priority? Regions could be sorted alphabetically bykey
internally before adding gutter icons. This way a lower prior regionA
could be overwritten by a regionB
as it is located afterA
in the sorted list.This way packages could use
key
to define the priority chain. Thekey
could have a name like010_package_usage
then.Example: