Skip to content

Commit

Permalink
Add lens to explore imports (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
whscullin authored Nov 19, 2024
1 parent 35b5282 commit 29ab455
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/server/lenses/lenses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 29ab455

Please sign in to comment.