ryu1kn / vscode-text-marker

Visual Studio Code Extension. Select text in your code and mark all matches. The marking colour is configurable
https://marketplace.visualstudio.com/items?itemName=ryu1kn.text-marker
MIT License
87 stars 17 forks source link

Use the same colors in Scrollbar and Textarea #12

Closed callamaris closed 6 years ago

callamaris commented 6 years ago

Hi,

can you please add an option to use the same colors in the scrolbar and in the textarea?

ryu1kn commented 6 years ago

Hi @callamaris,

I also thought about it a while back but didn't do it as it could be confusing if you have multiple colours on the same line in the text area.

Let's say you have yellow on line 10 and 100 and blue on line 5 and 100. On the scrollbar, TextMarker may show only 1 yellow for line 10 and 2 blues for line 5 and 100. If you look at the scrollbar, you would think yellow is only on line 10, and don't notice the other yellow on line 100...

If you have an idea to get around with this issue, let me know!!

ryu1kn commented 6 years ago

Now I think this again, maybe we introduce this and let the user to decide whether they want to use the same colours on the scrollbar providing a new config like useSameColorOnScrollbar

callamaris commented 6 years ago

in case of multiple colors in the same line it would be great, when its configurable, which color is shown in the scrollbar.

possible options: longest, shortest, oldest, latest or first/last highlighted character in line

the most intuitive default option, i think, would be when the latest created highlighting wins.

ryu1kn commented 6 years ago

Released as v1.0.0 :+1: I introduced a new config which enables you to use the highlight colours on the ruler. In case of multiple colours on the same line, the ruler colour depends on how the editor works; hence it's a default off option.

* `textmarker.useHighlightColorOnRuler` (default: `false`)

    Use the same color for both highlighting a text and showing the location on the ruler.
    If you have multiple highlights on the same line, the corresponding ruler color will be one of theirs.

https://github.com/ryu1kn/vscode-text-marker/blob/master/README.md#extension-settings