mirror of
https://github.com/huhu/rust-search-extension
synced 2024-11-14 23:57:07 +00:00
Add remind appendix to book search
This commit is contained in:
parent
627789b7d1
commit
94d83d4313
2 changed files with 8 additions and 2 deletions
|
@ -14,7 +14,7 @@ class HelpCommand extends Command {
|
||||||
"~": `Prefix ${c.match("~")} to search external crate's docs`,
|
"~": `Prefix ${c.match("~")} to search external crate's docs`,
|
||||||
"@": `Prefix ${c.match("@crate")} (${c.dim("e.g. @tokio")}) to search that crate's doc exclusively`,
|
"@": `Prefix ${c.match("@crate")} (${c.dim("e.g. @tokio")}) to search that crate's doc exclusively`,
|
||||||
"#": `Prefix ${c.match("#")} to search builtin attributes`,
|
"#": `Prefix ${c.match("#")} to search builtin attributes`,
|
||||||
"%": `Prefix ${c.match("%")} to search Rust official book chapters`,
|
"%": `Prefix ${c.match("%")} to search Rust book chapters`,
|
||||||
">": `Prefix ${c.match(">")} to search Rust clippy lints`,
|
">": `Prefix ${c.match(">")} to search Rust clippy lints`,
|
||||||
"?": `Prefix ${c.match("?")} to search caniuse.rs`,
|
"?": `Prefix ${c.match("?")} to search caniuse.rs`,
|
||||||
"1.": `Input ${c.match("Rust version")} (${c.dim("e.g. 1.42.0")}) to open its release page`,
|
"1.": `Input ${c.match("Rust version")} (${c.dim("e.g. 1.42.0")}) to open its release page`,
|
||||||
|
|
|
@ -377,7 +377,13 @@ function getPlatformOs() {
|
||||||
content: page.url,
|
content: page.url,
|
||||||
description: `${[...parentTitles.map(t => c.escape(t)), c.match(c.escape(page.title))].join(" > ")} - ${c.dim(page.name)}`
|
description: `${[...parentTitles.map(t => c.escape(t)), c.match(c.escape(page.title))].join(" > ")} - ${c.dim(page.name)}`
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
onAppend: () => {
|
||||||
|
return [{
|
||||||
|
content: ":book",
|
||||||
|
description: `Remind: ${c.dim("you can use")} :book ${c.dim("command to search all Rust books.")}`,
|
||||||
|
}];
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const LINT_URL = "https://rust-lang.github.io/rust-clippy/master/";
|
const LINT_URL = "https://rust-lang.github.io/rust-clippy/master/";
|
||||||
|
|
Loading…
Reference in a new issue