summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-term/src/ui/editor.rs13
-rw-r--r--languages.toml2
2 files changed, 11 insertions, 4 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 99fffbbd..1f20619d 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -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")),
diff --git a/languages.toml b/languages.toml
index 1256ffe1..20729b25 100644
--- a/languages.toml
+++ b/languages.toml
@@ -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]]