@lass-lang/vscode-lass-languageservice
v0.0.2
Published
Syntax highlighting and language support for Lass - CSS with embedded TypeScript
Downloads
58
Maintainers
Readme
Lass Language Support for VS Code
Official VS Code extension for the Lass language — syntax highlighting, bracket matching, and language features for .lass files.
Features
- Syntax Highlighting — Full TextMate grammar for
.lassfiles with VS Code-quality highlighting - Two-Zone Model — Proper highlighting for the TypeScript preamble (above
---) and CSS zone (below---) - Smart Editing — Auto-closing for Lass symbols:
{{ }},@{ },@( ) - Comment Toggling —
//line comments (Cmd+/) and/* */block comments (Shift+Alt+A) - Bracket Matching — Intelligent matching for CSS braces, JS brackets, and Lass symbols
What is Lass?
Lass is a CSS authoring language that embeds TypeScript instead of inventing its own programming constructs. Where Sass adds @mixin and @for, Lass uses real JavaScript/TypeScript — one language to learn, zero new control flow.
Learn more at lass-lang.dev
Quick Example
---
import palette from './palette.json'
const $primary = '#2563eb'
---
.button {
background: $primary;
}
:root {
{{ Object.entries(palette).map(([name, value]) => @{
--{{ name }}: {{ value }};
}) }}
}What you'll see:
- Lines 1-4: TypeScript preamble highlighted between
---delimiters $primaryhighlighted as a Lass variable{{ }}expressions highlighted as embedded TypeScript@{ }fragments highlighted as embedded CSS- Everything else highlighted as standard CSS
Installation
Install from the VS Code Marketplace:
- Open VS Code
- Go to Extensions (Cmd+Shift+X / Ctrl+Shift+X)
- Search for "Lass Language Support"
- Click Install
Or install from the command line:
code --install-extension lass-lang.vscode-lassSupported Lass Symbols
| Symbol | Purpose | Auto-close |
|--------|---------|------------|
| --- | Zone separator (preamble / CSS) | — |
| $param | Variable substitution | — |
| {{ expr }} | TypeScript expression interpolation | Yes |
| @{ css } | CSS fragment block | Yes |
| @(prop) | Property lookup accessor | Yes |
| // | Single-line comment (stripped from output) | — |
Requirements
- VS Code 1.80.0 or higher
Extension Settings
This extension contributes syntax highlighting and language configuration only. No additional settings are required.
Known Issues
See GitHub Issues for known issues and feature requests.
Release Notes
See CHANGELOG.md for release history.
Contributing
Contributions are welcome! Visit the Lass monorepo to get started.
License
MIT — See LICENSE for details.
