ZIm/crates/languages/src/rust
Finn Evers e5e3e9ac8c
rust: Improve runnable detection for test modules (#28024)
Closes #28002

This PR updates the `runnabless.scm` for Rust to improve detection of
test modules with non-standard names. Instead of matching on the module
name, we now check for the `#[cfg(test)]`-attribute above test modules.
This allows for generic matching whilst not regressing the previous
behaviour.

| `main` | <img width="922" alt="main"
src="https://github.com/user-attachments/assets/34fc4443-13a2-4e18-b806-7e14771c3df4"
/> |
| --- | --- |
| This PR | <img width="922" alt="PR"
src="https://github.com/user-attachments/assets/13e6a6d8-e177-4a83-89ab-24c0a69ade27"
/> |

Release Notes:

- Improved runnable detection for test modules in Rust.
2025-04-03 14:56:28 +00:00
..
brackets.scm vim: Update anyquotes and anybrackets to behave like mini.ai plugin (#24167) 2025-02-17 14:55:48 -07:00
config.toml Fix quotes in Rust (#19914) 2024-10-29 12:35:34 -06:00
embedding.scm chore: Extract languages from zed crate (#8270) 2024-02-23 15:56:08 +01:00
highlights.scm rust: Follow-up fixes for attribute highlighting (#26172) 2025-03-14 23:02:45 +00:00
indents.scm chore: Extract languages from zed crate (#8270) 2024-02-23 15:56:08 +01:00
injections.scm Use standard injection.language and injection.content captures (#22268) 2025-01-07 18:17:49 +00:00
outline.scm Revert accidental change to Rust outline files (#21545) 2024-12-04 11:58:56 -07:00
overrides.scm Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
runnables.scm rust: Improve runnable detection for test modules (#28024) 2025-04-03 14:56:28 +00:00
textobjects.scm Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00