Synonyms that are in the dictionary are marked in green. Synonyms that are not in the dictionary are marked in red.
Antonyms that are in the dictionary are marked in green. Antonyms that are not in the dictionary are marked in red.
If it is syntax then linters already do this, and they are built with the exact rules and best practices for that language.