Skip to content

Commit e556d72

Browse files
authored
Merge pull request #693 from taminomara/codelens-spelling
Fix spelling of `n usage(s)` in code lens
2 parents 16bcc62 + 67157fe commit e556d72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/emmylua_ls/src/handlers/code_lens/resolve_code_lens.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ fn make_usage_command(
7171
client_id: ClientId,
7272
refs: Vec<Location>,
7373
) -> Command {
74-
let title = format!("{} usage", ref_count);
74+
let title = format!(
75+
"{} usage{}",
76+
ref_count,
77+
if ref_count == 1 { "" } else { "s" }
78+
);
7579
let mut args = Vec::new();
7680
args.push(serde_json::to_value(uri).unwrap());
7781
args.push(serde_json::to_value(range.start).unwrap());

0 commit comments

Comments
 (0)