Closed sahashirshendu closed 4 months ago
Hi, I have trouble finding, the right method to do that kind of thing. The reason is, silicon uses the rust syntect crate to determine the language along with some heuristics, not only the extension. syntect in turn uses Sublime's grammar repository at https://github.com/sublimehq/Packages/?tab=readme-ov-file but I cannot find any reference for fortran. There may be some mapping going on, but until now, I was not able to find, where this is been done. I will keep looking into it - also for other reasons, but I have no immediate solution.
OK, since bat
also uses syntect, I could get a list of supported standard languages from there. It shows different names and mappings to extensions. Let me think of the best way to support this.
Hi,
can you try out the latest version? I have now implemented a fallback to the extension in case the first try to use the filetype does not work out. All explained in the new README. Please close the issue, if you are satisfied.
Thanks,
Michael.
Thanks a lot. The issue is indeed solved.
Gives:
silicon returned with: [error] Unsupported language: fortran
Although runningsilicon
from terminal generates image just fine. Sample filetest.f
:PS:
silicon
seems to be taking the file extension aslanguage
parameter, adding the following in setup fixes it ... but it isn't a very good solution ... is it?