Work the soft butter, sugar, and vanilla with a spoon or electric beater, until creamy. Then add the sifted flour and the chopped walnuts (you can toast them in a pan for a stronger flavor, otherwise put them in the dough raw), stirring well.
Transfer the cookie dough to the fridge for about an hour until it gets firmer; meanwhile, prepare a baking sheet covered with baking paper, and preheat the oven to 170°.
Shape the dough into small balls on the baking sheet. The cookies will spread a bit during cooking, but not very much, so if you want them to be flat you should crush them with a glass. The ones I baked shown in the picture were simply baked in the shape of a ball, without further handling.
Bake the cookies in a preheated oven until the bottom is golden, for 15/20 minutes. They will seem a bit crumbly just out of the oven, but if you leave them on the baking sheet until fully cooled they will be perfect.