https://github.com/tal7aouy/vscode-indent-colorizer
Extension which shows colorized indentation background to make your code more readable
https://github.com/tal7aouy/vscode-indent-colorizer
colorized extension indentation vscode-extension
Last synced: 3 months ago
JSON representation
Extension which shows colorized indentation background to make your code more readable
- Host: GitHub
- URL: https://github.com/tal7aouy/vscode-indent-colorizer
- Owner: tal7aouy
- License: mit
- Created: 2022-04-08T21:35:56.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-08T21:36:10.000Z (about 3 years ago)
- Last Synced: 2024-12-29T10:41:55.651Z (5 months ago)
- Topics: colorized, extension, indentation, vscode-extension
- Language: TypeScript
- Homepage:
- Size: 208 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
![]()
Indent Colorizer
---
## Installation
All instructions can be found at [INSTALL.md](./INSTALL.md).
A simple extension to make indentation more readable

Get it here: [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=tal7aouy.indent-colorizer)
It uses the current editor window tab size and can handle mixed tab + spaces but that is not recommended. In addition it visibly marks lines where the indentation is not a multiple of the tab size. This should help to find problems with indentation in some situations.
### Configuration
Although you can just use it as it is there is the possibility to configure some aspects of the extension:
```js
// For which languages indent-colorizer should be activated (if empty it means all).
"indentColorizer.includedLanguages": [] // for example ["php", "ts", "python"]// For which languages indent-colorizer should be deactivated (if empty it means none).
"indentColorizer.excludedLanguages": ["plaintext"]// The delay in ms until the editor gets updated.
"indentColorizer.updateDelay": 100 // 10 makes it super fast but may cost more resources
```_Notice: Defining both `includedLanguages` and `excludedLanguages` does not make much sense. Use one of both!_
You can configure your own colors by adding and tampering with the following code:
```js
// Defining custom colors instead of default "Colorizer" for dark backgrounds.
// (Sorry: Changing them needs an editor restart for now!)
"indentColorizer.colors": [
"rgba(255,255,64,0.07)",
"rgba(127,255,205,0.07)",
"rgba(255,128,210,0.07)",
"rgba(79,236,236,0.07)",
"rgba(78,184,237,0.07)",
"rgba(233,226,74,0.07)",
"rgba(101,74,233,0.07)",
]// The indent color if the number of spaces is not a multiple of "tabSize".
"indentColorizer.errorColor": "rgba(128,32,32,0.6)"// The indent color when there is a mix between spaces and tabs.
// To be disabled this coloring set this to an empty string.
"indentColorizer.tabmixColor": "rgba(128,32,96,0.6)"
```Skip error highlighting for RegEx patterns. For example, you may want to turn off the indent errors for JSDoc's valid additional space (disabled by default), or comment lines beginning with `//`
```js
// Example of regular expression in JSON (note double backslash to escape characters)
"indentColorizer.ignoreLinePatterns" : [
"/[ \t]* [*]/g", // lines begining with *
"/[ \t]+[/]{2}/g" // lines begininning with //
]
```Skip error highlighting for some or all languages. For example, you may want to turn off the indent errors for `markdown` and `haskell` (which is the default)
```js
"indentColorizer.ignoreErrorLanguages" : [
"markdown",
"haskell"
]
```If error color is disabled, indent colors will be rendered until the length of rendered characters (white spaces, tabs, and other ones) is divisible by tabsize. Turn on this option to render white spaces and tabs only.
```js
"indentColorizer.colorOnWhiteSpaceOnly": true // false is the default
```