The other day I was thinking about function colors and it occurred to me that it might be a good idea to take the abstract concept that's useful as a mental model and make it literal.
Imagine if when you opened your editor (Xcode* or otherwise), the compiler could impart its knowledge of isolation to allow the editor to hint/highlight/color a block of code in some way to help you reason about its isolation. Suddenly implicit isolation due to either compiler settings or defaults becomes "explicit" in that you can't mistake the distinction.
I don't have a proof of concept or anything (yet), just starting a conversation out loud and in the open. I'm curious to hear others' thoughts and to find out whether this is technically feasible. And, if feasible, where it ought to be explored? The LSP probably isn't the right fit, but it seems to be the closest right place?
Is anyone aware of a VSCode (or other editor) plugin that does something similar with either Swift or another language?
*Obviously, Xcode doesn't fall under the purview of this community, but I wonder if this kind of feature or tooling ought to be built as part of the Swift project and hope that it gets adopted.