mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
use unicode bar for drawing the cursor
This commit is contained in:
parent
1060041393
commit
cf4720ffd5
4 changed files with 24 additions and 17 deletions
|
@ -107,9 +107,13 @@ r#####"
|
|||
}
|
||||
|
||||
fn generate_docs(assists: &[Assist], mode: Mode) -> Result<()> {
|
||||
let mut buf = String::from("# Assists\n");
|
||||
let mut buf = String::from(
|
||||
"# Assists\n\nCursor position or selection is signified by `┃` character.\n\n",
|
||||
);
|
||||
|
||||
for assist in assists {
|
||||
let before = assist.before.replace("<|>", "┃"); // Unicode pseudo-graphics bar
|
||||
let after = assist.after.replace("<|>", "┃");
|
||||
let docs = format!(
|
||||
"
|
||||
## `{}`
|
||||
|
@ -124,7 +128,7 @@ fn generate_docs(assists: &[Assist], mode: Mode) -> Result<()> {
|
|||
{}
|
||||
```
|
||||
",
|
||||
assist.id, assist.doc, assist.before, assist.after
|
||||
assist.id, assist.doc, before, after
|
||||
);
|
||||
buf.push_str(&docs);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue