Some ideas: use different editors for different languages, or different color themes. Or another is to format code visually differently, for example when I write HTML I use double quotes, and when I write JavaScript I use single quotes, both are acceptable in both languages, but I feel like it helps keep them separate if I lean different directions within the expression allowed in the languages.