Metadata-Version: 2.4
Name: rbtr-lang-less
Version: 2026.9.0.dev1
Summary: rbtr — Less language plugin
Keywords: code-search,code-index,tree-sitter,static-analysis,semantic-search,developer-tools,less
Author: Alejandro Giacometti
Author-email: Alejandro Giacometti <alejandro.giacometti@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Text Processing :: Indexing
Classifier: Typing :: Typed
Requires-Dist: rbtr==2026.9.0.dev1
Requires-Dist: rbtr-lang-css==2026.9.0.dev1
Requires-Dist: tree-sitter-less
Requires-Python: >=3.13
Project-URL: Homepage, https://github.com/janrito/rbtr
Project-URL: Repository, https://github.com/janrito/rbtr
Project-URL: Documentation, https://github.com/janrito/rbtr/tree/main/packages/rbtr-lang-less#readme
Project-URL: Issues, https://github.com/janrito/rbtr/issues
Project-URL: Changelog, https://github.com/janrito/rbtr/releases
Description-Content-Type: text/markdown

# rbtr-lang-less

Less support for [rbtr]. Optional plugin — install with
`pip install rbtr[less]`.

[rbtr]: https://github.com/janrito/rbtr/tree/main/packages/rbtr#readme

## What it ingests

Less extends CSS with the Less preprocessor constructs. Definitions map onto
rbtr's capture conventions by shape:

- **Variables** — `@`-prefixed declarations (`@primary: #333;`).
- **Routines** — `.mixin()` definitions → functions. Mixin *calls* are
  references, not definitions, and are skipped.
- **Rule sets & at-rule blocks** — selectors, `@media`, `@keyframes` → classes
  (a named collection of declarations).
- **Directives** — `@charset` → config key.
- **Imports** — `@import` → imports (for cross-file edges).

## Chunks produced

`name` is the declaration/selector; `scope` is the ancestor rule-set
selectors for a nested rule (CSS-family nesting), else empty.

```less
@primary: #333;                /* variable "@primary"                 */
.rounded(@r) { … }             /* function "rounded"                  */
.btn { … }                     /* class ".btn"                        */
@keyframes slide { … }         /* class "slide"                       */
@import "reset";               /* import, metadata {module: "reset"}  */
```

## Embedded / injected chunks

None. Less does not embed other languages.

## Grammar & dependencies

Uses the `tree-sitter-less` grammar. Depends on **rbtr-lang-css** — it reuses
that plugin's public `css_nesting_scope` helper for CSS-family rule nesting.
