Teasim is a Visual Studio Code extension that provides an IDE-grade authoring experience for @teasim/styles utilities, including inline decorations, hover CSS previews, color chips, rem-to-px hints, and context-aware autocomplete.
Install from the Visual Studio Code Marketplace, or search for Teasim in the VS Code Extensions panel.
-
Real-time annotation and hover preview Matched utilities are underlined in editor, and hovering shows generated CSS.
-
Visual color preview Color-related utilities render inline color indicators for faster UI inspection.
-
rem to px conversion hints Optional rem-to-px hints are appended in hover output to improve readability.
-
Selection CSS inspector Select multiple utilities and hover to see their combined CSS result.
-
Utility autocomplete Autocomplete suggestions are available in supported languages with configurable matching behavior.
-
Class function string support Utilities inside configured class functions (for example
defineVariants(...)andmergeClass(...)) support autocomplete, underline annotation, and hover CSS preview.
- Open a workspace that contains UnoCSS/Teasim config.
- Ensure your config is discoverable, preferably as
uno.config.*orunocss.config.*in project root. - Open a supported file type and start editing utility classes.
- Use
Teasim: Reload Teasimafter changing config files.
| Command | Description |
|---|---|
Teasim: Reload Teasim |
Reload Teasim and refresh detected project context/configuration |
Teasim: Insert @unocss-skip for the selection |
Wrap the selected code with skip annotations |
| Key | Type | Default | Description |
|---|---|---|---|
teasim.disable |
boolean |
false |
Disable the Teasim extension |
teasim.languageIds |
string[] |
undefined |
Additional language IDs to enable support |
teasim.root |
string | string[] |
undefined |
Project root containing config files |
teasim.include |
string | string[] |
undefined |
File patterns/directories to include |
teasim.exclude |
string | string[] |
undefined |
File patterns/directories to exclude |
teasim.underline |
boolean |
true |
Enable underline decorations for matched utilities |
teasim.colorPreview |
boolean |
true |
Enable color preview decorations |
teasim.colorPreviewRadius |
string |
"50%" |
Border radius for color preview swatches |
teasim.remToPxPreview |
boolean |
true |
Enable rem-to-px hints in hover preview |
teasim.remToPxRatio |
number |
16 |
Ratio used for rem-to-px conversion |
teasim.selectionStyle |
boolean |
true |
Enable selection style hover preview |
teasim.strictAnnotationMatch |
boolean |
false |
Restrict annotations to stricter matching context |
teasim.autocomplete.matchType |
"prefix" | "fuzzy" |
"prefix" |
Autocomplete matching strategy |
teasim.autocomplete.strict |
boolean |
false |
Restrict autocomplete to stricter matching context |
teasim.autocomplete.maxItems |
number |
1000 |
Maximum autocomplete items returned |
teasim.autocomplete.classFunctions |
string[] |
["defineVariants", "mergeClass"] |
Function names whose string arguments should support utility autocomplete, underline annotation, and hover preview |
Recommended baseline:
{
"teasim.strictAnnotationMatch": true,
"teasim.autocomplete.strict": true,
"teasim.autocomplete.matchType": "prefix",
"teasim.autocomplete.classFunctions": ["defineVariants", "mergeClass"],
"teasim.remToPxRatio": 16
}Use skip annotations to exclude specific code from utility analysis.
HTML / Vue / Svelte:
<!-- @unocss-skip -->
<div class="...">...</div>Block-level skip:
<!-- @unocss-skip-start -->
<div class="...">...</div>
<!-- @unocss-skip-end -->CSS:
/* @unocss-skip */
.selector { color: red; }JavaScript / TypeScript:
// @unocss-skip
const cls = "text-red-500";Enabled by default for:
astro, css, ejs, erb, haml, hbs, html, javascript, javascriptreact, less, markdown, marko, php, postcss, rust, sass, scss, stylus, svelte, typescript, typescriptreact, vue, vue-html
You can extend support using teasim.languageIds.
For performance, utility detection in JavaScript/TypeScript defaults to:
*.jsxand*.tsx*.props.jsand*.props.ts
If you need hover/annotation in other .js / .ts files, add an include annotation (@unocss-include) or widen content.pipeline.include in your UnoCSS config.
Prerequisites:
- VS Code
^1.109.0 - Bun runtime
Local workflow:
bun install
bun run developBuild and package:
bun run build
bun run packRegenerate extension metadata:
bun run update-
No hover or annotation appears Check that your project config is detected (
uno.config.*/unocss.config.*), then runTeasim: Reload Teasim. For JS/TS files, also confirm the filename matches the default scope (*.jsx,*.tsx,*.props.js,*.props.ts) or explicitly include the file. -
Suggestions are too noisy Enable
teasim.autocomplete.strictandteasim.strictAnnotationMatch. -
A language is not supported Add it to
teasim.languageIds.
- Homepage: https://vscode.teasim.com
- Repository: https://github.com/teasim/vscode
- Issues: https://github.com/teasim/vscode/issues