Calcite is a neat project that uses existing projects to suggest code snippets. https://edelstein.pebbles.cs.cmu.edu/calcite/ (hasn't hit the industry AFAIK)
miniblog.
Related Posts
Thinking more about the "auto eval definitions" approach, I think it breaks down when debugging. If I want to step through the existing definition, it'd be really awkward to re-evaluate the definition at my cursor.
What software designs require clean slate 'revolution' implementations, rather than evolution?
I can think of: borrow checking in a PL (existing code is unsafe), microkernels (architecture is too different from monokernels), and full REPLs (can't add type redefinition later).
C# has an interesting concept of second-class macros called Source Generators: https://devblogs.microsoft.com/dotnet/introducing-c-source-generators/
You can generate additional code at build time, but you can't transform existing expressions (unlike normal macros), so it's more amenable to tooling.

