From 29ab4557a24f378726f388c5d86e21229697f334 Mon Sep 17 00:00:00 2001 From: Will Scullin Date: Mon, 18 Nov 2024 17:39:59 -0800 Subject: [PATCH] Add lens to explore imports (#553) --- src/server/lenses/lenses.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/server/lenses/lenses.ts b/src/server/lenses/lenses.ts index e350e73b..7a1c1e73 100644 --- a/src/server/lenses/lenses.ts +++ b/src/server/lenses/lenses.ts @@ -258,6 +258,16 @@ export async function getMalloyLenses( }, }); } + symbol.children.forEach((child, idx) => { + lenses.push({ + range: child.lensRange.toJSON(), + command: { + title: idx === 0 ? `Explore: ${child.name}` : child.name, + command: 'malloy.openComposer', + arguments: [child.name], + }, + }); + }); } catch (e) { console.error('import code lens failed with', e); }