This would mean creating a view function, with a dictionary for mapping file extensions to prismjs supported filetypes, then injecting that information into each code snapshot.
It may require a change to the data model, so that each snapshot contains a hash field for the filetype.