๐Ÿ“ฆ hediet / vscode-colored-background

โ˜… 0 stars โ‘‚ 0 forks ๐Ÿ‘ 0 watching
๐Ÿ“ฅ Clone https://github.com/hediet/vscode-colored-background.git
HTTPS git clone https://github.com/hediet/vscode-colored-background.git
SSH git clone git@github.com:hediet/vscode-colored-background.git
CLI gh repo clone hediet/vscode-colored-background
Henning Dieterichs Henning Dieterichs update 6be292a 1 months ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ .vscode
๐Ÿ“ demo
๐Ÿ“ src
๐Ÿ“„ .gitignore
๐Ÿ“„ .vscode-test.mjs
๐Ÿ“„ .vscodeignore
๐Ÿ“„ CHANGELOG.md
๐Ÿ“„ esbuild.js
๐Ÿ“„ eslint.config.mjs
๐Ÿ“„ package-lock.json
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ tsconfig.json
๐Ÿ“„ vitest.config.ts
๐Ÿ“„ README.md

Colored Background

Colors the background of the code editor according to rules.

Features

  • Define rules to color background blocks based on start and end regex.
  • Support for backreferences in end regex (e.g. end \1).
  • Cycle through a pool of colors for consecutive blocks.
  • Support for theme colors and custom colors.

Extension Settings

This extension contributes the following settings:

  • coloredBackground.rules: Array of rules.
  • path: Regex for file path.
  • startLine: Regex for start line.
  • endLine: Regex for end line.
  • color: Background color (hex, rgb, or theme color ID).
  • poolId: ID of the color pool to use.
  • coloredBackground.pools: Object defining color pools.

Example Configuration

"coloredBackground.pools": {
    "myPool": ["rgba(255, 0, 0, 0.1)", "rgba(0, 255, 0, 0.1)"]
},
"coloredBackground.rules": [
    {
        "path": ".*\\.ts",
        "startLine": "describe\\(.*",
        "endLine": "\\}\\);",
        "poolId": "myPool"
    },
    {
        "path": ".*\\.lean",
        "startLine": "namespace (.*)",
        "endLine": "end \\1",
        "color": "editor.selectionBackground"
    }
]

Release Notes

0.0.1

Initial release.