Xcode 9 code completion and highlighting not working
In Finder I navigated to user->Library->Developer->Xcode->DerivedData and deleted the subfolder of the project in question. After next build of the project the syntax highlighting and code completion returned.
In my situation, there are a few of .swift files not working. I've overcome by removing these files from project and re-adding them back.
Quitting Xcode then reopening it works for me.