It looks like this might be "The Salute" by cabepfr. It has a Snape with throat injuries, Hermione as a teacher, and the costumes.
When Snape resurrects after Nagini's bite, he finds that his breathing has been seriously compromised. Healers and nurses fuss around him all day in St. Mungo's, performing spells on his mauled throat, chanting and wand-waving. They surround his head with a bubble of oxygen, which he hates because it's worrisomely similar to the snake's cage in which the Dark Lord encapsulated his head.
....
When Hermione sets her feet on the Hogwarts stairs again as Professor Granger, for the first time she feels intimidated by those walls. All the trepidation she never felt when she was eleven, she feels now. She has helped to rebuild the castle, but being an official representative of it now makes her stagger. At eighteen (nineteen in a few weeks) she is Hogwarts' youngest professor in three centuries, surpassing even Professor Snape who was twenty when he joined the staff. She is too young for the role, but at the same time she feels unaccountably old. As old as an army going to battle again, after the previous war has barely ended.
...
For the first Halloween party of Hogwarts' new course, Severus has no doubts about how he will dress. He has always hated Halloween because it is the anniversary of Lily's death, and he has always hated parties because he is Snape, but he is not a coward, and has decided that for once he will tackle the issue straight out and in the open. This year he will dress up as Darth Vader. He transfigures a hat into Vader's helmet and mask, a vest into his breastplate and an old broomstick into a lightsaber. His usual black robe and cloak will do the rest.
....
For the first Halloween party of Hogwarts' new course, Hermione has no doubts about how she will dress. Thinking about the Enterprise has sustained her through her first months of teaching, so it's natural that she will dress as one of the crew. She is only uncertain about what colour to wear. The captain's gold? Engineering staff's red? Science's blue? Uhura's miniskirt or Next Generation uniform with trousers? She fiddles with the colours and length so much that she feels less like an Enterprise crew member and more like one of the Sleeping Beauty's fairy godmothers. In the end, however, she settles for a classic Uhura dress, only lengthening the hem a bit so she will be comfortable dancing in it. It is an iconic dress, worn by a brave woman, and she feels proud of her choice as she enters the Great Hall. She greets colleagues and students graciously, accepts a cup of butterbeer, chats nonchalantly.
Found via a search for harry potter snape "darth vader" hermione "star trek"