Hecr::LSP::Css
:class ⇄ CSS-modules support: parsing class selectors out of a
.module.css file, finding the static class tokens inside a :class
attribute, resolving the styles module a template is paired with, and
detecting the completion context. hecr never depends on a CSS shard, so
the LSP reads the .module.css directly — the same file the provider
(lightening_css_modules) compiles at build time.
Constants
Instance methods
The class selector whose name span contains a 0-based position.
Class selectors declared in a stylesheet. Declaration blocks are
consumed whole (so composes: references and property values never
count), strings and comments are skipped, and at-rule blocks
(@media { … }) are descended into so nested selectors are seen.
Static class-name tokens (and their spans) in every :class value on a
line: the whole of a quoted :class="a b", and the string literals
inside :class={[...]} ("a", cond && "b") — exactly what the
compiler resolves against the styles module. Bare expressions are
runtime lookups and are skipped.
Is the cursor inside a :class value, positioned to complete a class
name? True inside an unclosed quoted value, or inside an unclosed
string literal within :class={ … }.
If the cursor sits right after Module. inside an open :class={ … }
(outside any string), the module to complete class names from.
Module-qualified tokens in every :class={…} value on a line, scanning
only the parts outside string literals (so they aren't matched inside a
bare "a.b" token).
The raw argument of a <%@ styles … %> directive: a quoted path
("./ui.module.css") or a module constant (ThemeStyles).