Recently, I’ve been working on a project involving “custom” file extensions. As most of you know, on Replit, when creating a file with a file extension that doesn’t already exist, it will be created as a
.txt file, or in other words, a file containing plain text. Since I’m trying to create a new language, I find it incredibly irritating that the text in my file is always white. There’s currently no built-in way to change this, and I think that there should be.
For example, the extension
.html both get their own syntax highlights. However, if you copied the contents of a
.py file to a
.txt file, the code inside the
.py file would have syntax highlights, whereas the
.txt file would become white and colorless without syntax highlights. If you put in your own format, for example,
.myl, it would be the same as the
.txt file - white and colorless.
I’m that saying you should be able to take the syntax highlighting from that
.py file I mentioned before, and apply it to the
.myl files. In addition to what I just mentioned, you should be able to customize the syntax highlighting like you can with themes, except the it would be specific to each file type.