Turning Query> SQLCMD Mode on and off again fixed the issue for me in SSMS 18.1, although it was never turned on from the start.
After trying all the answers here to no avail and giving up , I was still interested in the SQLCMD mode mentioned in the Chow Lover answer. I turned it on to see what he did, but did not notice any changes, so turned it off again. Intellisense woke up suddenly and has been working fine ever since.
source share