mirror of https://github.com/helix-editor/helix
Add extra annotations to completions
parent
98fda6b8f0
commit
f53d8411cb
|
@ -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…
Reference in New Issue