From c6d20363025c4f99a31d5037c3ff054e96ce6263 Mon Sep 17 00:00:00 2001 From: eric sciple Date: Fri, 2 Jan 2026 14:44:57 -0600 Subject: [PATCH] Remove filterText from escape hatch completions (#280) Escape hatch completions like '(switch to list)' and '(switch to mapping)' were being filtered out in VS Code because filterText was set to the key name (e.g., 'runs-on'), which doesn't match the empty string at the cursor position when completing a value. Since escape hatches only appear when the value is empty anyway, there's no need for filterText. Without it, VS Code uses the label for filtering, which properly shows them when no text is typed. --- languageservice/src/complete.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/languageservice/src/complete.ts b/languageservice/src/complete.ts index 65e37d0..eeabc76 100644 --- a/languageservice/src/complete.ts +++ b/languageservice/src/complete.ts @@ -399,7 +399,6 @@ function getEscapeHatchCompletions( results.push({ label: "(switch to list)", sortText: "zzz_switch_1", - filterText: keyName, // Allow filtering by key name textEdit: { range: editRange, newText: `${keyName}:\n${indentation}- ` @@ -411,7 +410,6 @@ function getEscapeHatchCompletions( results.push({ label: "(switch to mapping)", sortText: "zzz_switch_2", - filterText: keyName, // Allow filtering by key name textEdit: { range: editRange, newText: `${keyName}:\n${indentation}`