vscode-todo-highlight icon indicating copy to clipboard operation
vscode-todo-highlight copied to clipboard

I just want an border frame.

Open FPXjunzhu opened this issue 1 year ago • 2 comments

I just want an border frame. I don't want to change the original color of the code. My code original like this: image

My setting.json like is: "todohighlight.defaultStyle": { "border": "1px solid #eee", "borderRadius": "2px", "isWholeLine": false, }, My code like this: image

If I set it like this "todohighlight.defaultStyle": { "backgroundColor": "rgba(255, 255, 0, 0)", "overviewRulerColor": "rgba(255, 255, 0, 0.1)", "border": "1px solid #eee", "borderRadius": "2px", "isWholeLine": false, },

And, My code like this: image

So, what should I do?

FPXjunzhu avatar Jul 05 '24 15:07 FPXjunzhu

I don't think you have shown all your settings, because by default that text won't be highlighted. But it does seem that it currently changes the colour of the text to blue when a "color" isn't specified. I'd not found this edge case before.

A PR to fix this would be welcome.

jgclark avatar Jul 12 '24 13:07 jgclark

I don't think you have shown all your settings, because by default that text won't be highlighted. But it does seem that it currently changes the colour of the text to blue when a "color" isn't specified. I'd not found this edge case before.

A PR to fix this would be welcome.

OK, Fine. I'll try to fix it.

FPXjunzhu avatar Jul 12 '24 14:07 FPXjunzhu

I review the code. And I find way. Just need setting like this: "color": "", "backgroundColor": "", That overwrite DEFAULT_STYLE. The code like this: image

Last, I have a question. @jgclark Why are defind the DEFAULT_STYLE in package.json? image image

cuiwanzhi avatar Sep 16 '24 08:09 cuiwanzhi

Last, I have a question. @jgclark Why are defind the DEFAULT_STYLE in package.json?

Because then TODO: and FIXME: will work as soon as you turn the extension on, without needing users to work out how to configure the colour codes. But it can be over-ridden (as you have done) when a user decides to learn more about it.

jgclark avatar Sep 17 '24 08:09 jgclark