Which literary device would repetition be considered: syntax, detail or diction? (for example, "He laughed and laughed and laughed.")?
Syntax in itself refers to arrangement of words in a sentence, but in literature it is specific arrangement of words in a sentence in the manner that a purpose or desired effect is achieved.
Let's look at the sentence:
"He laughed and laughed and laughed."
The sentence does not have regular syntax as the word "laughed" is utilized over and over to emphasize something that can't tell just off this sentence. But the repeated use of word "laugh" and the unorthodox use of the conjunction "and", can be assumed to be done deliberately by the writer to achieve a desired effect, through arranging the words in the sentence in this manner.
This best matches the literary definition of syntax.