In a bowl, whisk together flour, cocoa, chopped pistachios, and salt. With an electric mixer on medium speed, beat butter until fluffy, about 3 minutes. Add sugar and continue to beat until pale, about 2 minutes. Reduce speed to low, add vanilla, then beat in flour mixture just until incorporated and dough begins to come together. Gather dough into a ball. Wrap in plastic, pat into a disk, and refrigerate about 1 hour.