(id)
identifier references
clojure
(id val?)Where:
- val: identifier name to match *
Behavior
- Bare
(id)matches identifier usages, not definition names. - With a value, it can also match type names, field names, and the final segment of a
path::name.
Examples
Find usages of a constant without matching its declaration.
clojure
(id CONFIG_PATH)Selects in lines { 1, 1 } but not in { 1 }:
rust
const CONFIG_PATH: &str = "/etc/app.conf";
fn load() {
let path = CONFIG_PATH;
println!("{path}");
}Locate Duration references in type annotations and paths.
clojure
(id Duration)Selects in lines { 1, 1 } but not in { 3 }:
rust
use std::time::Duration;
fn retry(delay: Duration) {
let _ = Duration::from_secs(1);
}Arguments
val
• Identifier • String • Pattern
Does NOT support: Composition — Free-form Selection — Refinement — Replacement