Began occurring only a week ago.
I have been utilizing Visual Studio for modifying my entire my source code.
For months now, my .swift code file has exceeded 10,000 lines. Abruptly, everything starting from the 10,000th line is in black and white, while everything preceding that is in color.
I recently upgraded VS.
2
Answers
This issue is similar to Javascript Files Lose Color Coding after 10000 lines of code,
Looks like this limitation is by design at this moment.
You can try out these workarounds(Feature Flags extension/Set VsRegEdit) in above ticket to see it they help. As this similar question is reported and marked as Fixed – Pending Release, we can focus on this to see if there is any update.
Besides, you can consider breaking up large source code files into smaller, more manageable pieces. This can help improve performance and maintain color formatting if it is convenient for you.
The issue referenced by Dou Xu-MSFT has been updated, and a fix has been implemented in the latest release (17.12.0). You can update the line limit by going to Tools -> Options -> Text Editor -> Advanced, and update "TextMate parser line limit (required restart)".