Preheat the oven to 375° F.
IN the bowl of a mixer beat butter, granulated sugar, brown sugar, and vanilla extract until light and creamy.
Add in eggs and mix well.
Add in flour, baking soda, and salt, and mix to combine.
Stir in most of the chocolate chips (reserving some if you want to see chocolate on the tops of the cookies.
Add in the nuts and most of the rosemary, and reserve a teaspoon for tops.
Use a 2 tablespoon scoop and place the dough onto parchment-lined baking sheets, place some chips, and rosemary on top of each cookie.
Bake for 9 to 10 minutes or until the edges are golden brown.
Add the sea salt flakes now, when the cookies just come out of the oven.
Allow the cookies to cool and set up before serving, warm cookies are good to serve.