Since the new beta update 1.7.0, you can manually assign your companions as captains of formations. Now you can also assign yourself as a captain of a formation in your own party. To my knowledge, captain perks only worked for companions assigned as formation captains and the player character if they were assigned a captain role in an NPC army. Now I'm not sure if the captain perks work for the player character if they assign themselves as a formation captain, since this was impossible to do before.