1 1/4 cups all-purpose flour
1/2 cup finely ground walnuts
1 1/2 teaspoons finely chopped fresh rosemary
1/2 teaspoon salt
1/2 cup (1 stick) unsalted butter, softened
1/4 cup packed dark-brown sugar
1/4 cup granulated sugar
1 teaspoon pure vanilla extract
Raw sugar, for decorating
1. Preheat oven to 300°. Whisk flour, nuts, rosemary, and salt in a large bowl.
2. Put butter and sugars into the bowl of an electric mixer fitted with the paddle attachment. Mix on medium speed until lightened, about 3 minutes. Mix in vanilla. Reduce speed to low. Add flour mixture; mix until dough comes together and is smooth, about 3 minutes.
3. Turn out dough onto parchment paper, and pat into a round. Place parchment paper on top; roll into a 12-inch round, 1/4 inch thick. Transfer to a baking sheet; refrigerate until firm, about 30 minutes.
4. Cut out cookies using various sizes of heart-shape cutters (1/2 inch to 3 inches); transfer to parchment-lined baking sheets. (Keep same-size cookies on same sheet.) Roll scraps; cut out. Gently press raw sugar onto edges of cookies.
5. Bake until just golden, 15 to 18 minutes. Let cool on sheets on wire racks. Cookies can be stored in an airtight container at room temperature up to 5 days.