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 .py and .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 .txt and .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.
for now, if the python syntax highlighting works for your language, you could make it use a .myl.py extension instead, or you could edit your .myl file on replit through a .py symlink. For example, run in shell:
The problem I have is that my language uses its own syntax, and is interpreted with python. So, I can’t symlink it (I’ll just assume that symlink means to “disguise” the file as another extension, feel free to correct me if I’m wrong) because it’s not a python file, and isn’t meant to be.
(btw for context .myl shown above is standing for “my language”, the actual project uses .mud, .stmud, and .bmud. I can put a link to the project if you’d like.)
This needs to be added. As a developer for the Aardvark programming language, which is now a LLVM compiler written in Aardvark for Aardvark, it is very difficult to build large projects such as this compiler on replit without syntax highlighting or autocomplete.