Place the walnuts, basil, garlic, salt, and pepper in a jar. Use an immersion blender to break everything down into a rough, chunky paste.
Slowly drizzle in the olive oil and continue to blend until the basil walnut pesto is smooth. Mix in the lime juice if desired for added freshness and color.
Use immediately as a spread for sandwiches, on salads, or as a pasta sauce.
Store any leftover pesto in an airtight container in the refrigerator for up to 5 days.