列出Laravel中的所有高光时,TODO突出显示不起作用

问题描述 投票:0回答:1

我希望在我的TODO:文件中显示所有FIXME:.blade.php笔记。但是没有这样做,它只是在左下角显示0%搜索,没有任何反应。

我在settings.json中粘贴了这个设置:

"todohighlight.include": [
        "**/*.js",
        "**/*.jsx",
        "**/*.ts",
        "**/*.tsx",
        "**/*.html",
        "**/*.php",
        "**/*.css",
        "**/*.scss",
        "**/*.blade.php"
    ]

我已将.blade.php列入名单,我错过了什么吗?我应该粘贴更多东西吗?顺便说一句,我的VS代码的版本是1.31.1

如果我对这个问题的标记是错误的,我很抱歉,让我知道所以我可以编辑它。

laravel visual-studio-code vscode-settings laravel-5.7
1个回答
0
投票

您需要为TODO和FIXME定义样式高亮:

示例settings.xml

"todohighlight.keywords": [
        {
            "text": "NOTE:",
            "color": "#ecf0f1",
            "border": "1px solid #2980b9",
            "borderRadius": "4px",
            "backgroundColor": "#3498db",
        },
        {
            "text": "HACK:",
            "color": "#ecf0f1",
            "border": "1px solid #8e44ad",
            "borderRadius": "4px",
            "backgroundColor": "#9b59b6",
        },
        {
            "text": "FIXME:",
            "color": "#ecf0f1",
            "border": "1px solid #f39c12",
            "borderRadius": "4px",
            "backgroundColor": "#f1c40f",
        },
        {
            "text": "BUG:",
            "color": "#ecf0f1",
            "border": "1px solid #c0392b",
            "borderRadius": "4px",
            "backgroundColor": "#e74c3c",
        },
        {
            "text": "TODO:",
            "color": "#ecf0f1",
            "border": "1px solid #27ae60",
            "borderRadius": "4px",
            "backgroundColor": "#2ecc71",
        }
]

参考:https://github.com/wayou/vscode-todo-highlight/issues/93

© www.soinside.com 2019 - 2024. All rights reserved.