Add extra annotations to completions
This commit is contained in:
parent
98fda6b8f0
commit
f53d8411cb
2 changed files with 11 additions and 4 deletions
|
@ -719,9 +719,16 @@ impl EditorView {
|
|||
|
||||
let noop = |_input: &str| Vec::new();
|
||||
let completer = match field_type {
|
||||
Some("filename") => super::completers::filename,
|
||||
Some("directory") => super::completers::directory,
|
||||
_ => noop,
|
||||
Some(field_type) => {
|
||||
if field_type.starts_with("filename") {
|
||||
super::completers::filename
|
||||
} else if field_type.starts_with("directory") {
|
||||
super::completers::directory
|
||||
} else {
|
||||
noop
|
||||
}
|
||||
}
|
||||
None => noop,
|
||||
};
|
||||
Prompt::new(
|
||||
format!("{}: ", field_type.unwrap_or("arg")),
|
||||
|
|
|
@ -173,7 +173,7 @@ args = { mode = "exec", program = "{0}" }
|
|||
[[language.debugger.templates]]
|
||||
name = "test"
|
||||
request = "launch"
|
||||
completion = [ "directory", "directory" ]
|
||||
completion = [ "directory: tests", "directory: cache output" ]
|
||||
args = { mode = "test", program = "{0}", output = "{1}" }
|
||||
|
||||
[[language.debugger.templates]]
|
||||
|
|
Loading…
Reference in a new issue