Add extra annotations to completions

pull/574/head
Dmitry Sharshakov 3 years ago
parent 98fda6b8f0
commit f53d8411cb
No known key found for this signature in database
GPG Key ID: 471FD32E15FD8473

@ -719,9 +719,16 @@ impl EditorView {
let noop = |_input: &str| Vec::new(); let noop = |_input: &str| Vec::new();
let completer = match field_type { let completer = match field_type {
Some("filename") => super::completers::filename, Some(field_type) => {
Some("directory") => super::completers::directory, if field_type.starts_with("filename") {
_ => noop, super::completers::filename
} else if field_type.starts_with("directory") {
super::completers::directory
} else {
noop
}
}
None => noop,
}; };
Prompt::new( Prompt::new(
format!("{}: ", field_type.unwrap_or("arg")), format!("{}: ", field_type.unwrap_or("arg")),

@ -173,7 +173,7 @@ args = { mode = "exec", program = "{0}" }
[[language.debugger.templates]] [[language.debugger.templates]]
name = "test" name = "test"
request = "launch" request = "launch"
completion = [ "directory", "directory" ] completion = [ "directory: tests", "directory: cache output" ]
args = { mode = "test", program = "{0}", output = "{1}" } args = { mode = "test", program = "{0}", output = "{1}" }
[[language.debugger.templates]] [[language.debugger.templates]]

Loading…
Cancel
Save