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

colorize: 0 variables detected?

Open alexzhaohong opened this issue 3 years ago • 3 comments

How do I get variable colors.color to render?

colorize.enable_search_variables is true.

Screen Shot 2021-11-10 at 3 42 03 PM Screen Shot 2021-11-10 at 3 49 00 PM

    "colorize.languages": [
        "css",
        "scss",
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact",
      ],
    "colorize.hide_current_line_decorations": false,
    "colorize.colorized_variables": [
        "CSS",
    ],
}

alexzhaohong avatar Nov 10 '21 20:11 alexzhaohong

This extension seems to working using text match, but you want using it with runtime variable value...

tjx666 avatar Nov 23 '21 16:11 tjx666

This extension seems to working using text match, but you want using it with runtime variable value...

The extension does offer variable matching functionality with colorize.colorized_variables

alexzhaohong avatar Nov 23 '21 16:11 alexzhaohong

That for css variable or othe css pre-precess language, not for other languages which need to run. Css can be analyzed using lsp or ast parser, but ts is a script language, for a variable, that value should be know only after run it. For a browser ts code, how you know the value of it?

tjx666 avatar Nov 23 '21 16:11 tjx666