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

Disable default highlight settings

Open jd-solanki opened this issue 3 years ago • 6 comments

Hi,

I really love this plugin but the issue is, it is highlighting my todos which I don't want. I already use another todo extension which highlights the todos and provides extra features.

I want to disable default highlighting regex (settings). I tried removing it from my settings but recently I updated vscode and it appeared again.

Regards.

jd-solanki avatar Dec 15 '21 07:12 jd-solanki

@jd-0001 don't they disappear as soon as you provide some settings of your own?

fabiospampinato avatar Feb 16 '22 05:02 fabiospampinato

I only use this extension in certain projects so settings are not tweaked.

However, as per your comment, I have updated global settings to:

"highlight.regexes": {},

I will reopen this issue if found any unexpected behavior.

Thanks for your response :)

jd-solanki avatar Feb 17 '22 05:02 jd-solanki

Hi @fabiospampinato

Even if I reset the config as shown above on frequent vscode restart default config comes back.

jd-solanki avatar Feb 18 '22 14:02 jd-solanki

same here, i have

"highlight.regexes": {
        "((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *TODO(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": {
            "filterFileRegex": ".*(?<!CHANGELOG.md)$",
            "decorations": [
                {
                    "overviewRulerColor": "#ffcc00",
                    "backgroundColor": "#ffcc00",
                    "color": "#1f1f1f",
                    "fontWeight": "bold"
                },
                {
                    "backgroundColor": "#ffcc00",
                    "color": "#1f1f1f"
                }
            ]
        },
        "((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *(?:FIXME|FIX|BUG|UGLY|DEBUG|HACK)(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": {
            "filterFileRegex": ".*(?<!CHANGELOG.md)$",
            "decorations": [
                {
                    "overviewRulerColor": "#cc0000",
                    "backgroundColor": "#cc0000",
                    "color": "#1f1f1f",
                    "fontWeight": "bold"
                },
                {
                    "backgroundColor": "#cc0000",
                    "color": "#1f1f1f"
                }
            ]
        },
        "((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *(?:REVIEW|OPTIMIZE|TSC)(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": {
            "filterFileRegex": ".*(?<!CHANGELOG.md)$",
            "decorations": [
                {
                    "overviewRulerColor": "#00ccff",
                    "backgroundColor": "#00ccff",
                    "color": "#1f1f1f",
                    "fontWeight": "bold"
                },
                {
                    "backgroundColor": "#00ccff",
                    "color": "#1f1f1f"
                }
            ]
        },
        "((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *(?:IDEA)(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": {
            "filterFileRegex": ".*(?<!CHANGELOG.md)$",
            "decorations": [
                {
                    "overviewRulerColor": "#cc00cc",
                    "backgroundColor": "#cc00cc",
                    "color": "#1f1f1f",
                    "fontWeight": "bold"
                },
                {
                    "backgroundColor": "#cc00cc",
                    "color": "#1f1f1f"
                }
            ]
        }
    }

that keeps getting added no matter what i do

ctf0 avatar Apr 26 '22 21:04 ctf0

@jd-0001 to disable it should be

"highlight.regexes": {
        "": ""
    }

because of https://github.com/fabiospampinato/vscode-highlight/blob/a112630b3517c6b35fb5f2532199d1be509b76e4/src/config.ts#L22

ctf0 avatar Apr 26 '22 21:04 ctf0

Thanks for the workaround @ctf0

Another workaround (I think this is normal) is to just disable the extension and only enabled it where I was using it and fortunately I overrides the settings where I use it :)

jd-solanki avatar Apr 27 '22 04:04 jd-solanki

Still a problem... Would be nice to have a fix... In my opinion there shouldn't even be a default anyway, but it's probably too late for that since the bug already became a feature :(

nylnx avatar Jan 27 '23 22:01 nylnx

Still a problem... Would be nice to have a fix...

Setting this in your global settings should "fix" it:

"highlight.regexes": {
  "": ""
}

In my opinion there shouldn't even be a default anyway

Yeah there probably shouldn't, I think I made a mistake by setting some default configs, but some people thought this extension was meant to highlight todos by default or something.

but it's probably too late for that since the bug already became a feature :(

Possibly yeah. Setting that global setting should get rid of the problem though, I think.

Closing for lack of a better option. Perhaps the default configuration will be deleted in a v2 release.

fabiospampinato avatar Jan 31 '23 15:01 fabiospampinato