sbarex / SourceCodeSyntaxHighlight

Quick Look extension for highlight source code files on macOS 10.15 and later.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for .do (Stata)

norrissam opened this issue · comments

Hi and thanks for this great plugin. I was wondering if it would be possible to support .do files (Stata) even just as plaintext. Thanks!

Yeah, .do files and .ado files. Thanks!

commented

Ok, so I suspend the implementation of this language.

commented

Ok, so I suspend the implementation of this language.

But the StataCorp version doesn't have syntax, just plain text. If you can make a preview with syntax, that would be even better:) Thank you!

commented

No, Highlight the rendering engine do not handle the Stata syntax, so I can only show the code as plain text (with line numbers if you want).

If it's easy to do I'd still appreciate adding support for .do and .ado files - there are lots of old versions of Stata out there that this update won't fix.

commented

@sbarex I'm having the same issue. I wonder if you could consider letting the plugin render unsupported file format just as a plain text. I read the doc, and it seems like this is only doable when a file does not an extension now. Or maybe link a file format to another and allow it to render an unknown format as a known one? For example, Stata also has a format .stjson, and it is really just a json file, and they like to make it unique somehow.

commented

Added support as plain text on release 2.1.18.

commented

@sbarex thank you for the fix. Am I missing something here? I saw there is already 2.1.18 on brew, but not when you click check for updates

CS-8d8nzM8v@2x

commented

now the automatic update should work

I have upgraded to version 2.1.18 :
image

however, preview function still not work for Stata do file :
image

have I missed something important?

commented

That's weird. It's working on my end.
CS-7ndaFxwo@2x

commented

I have upgraded to version 2.1.18 : image

however, preview function still not work for Stata do file : image

have I missed something important?

It is possible that the format has been registered by Stata with a particular UTI. From the inquiry window it is possible to see which UTI is associated with the extension.

commented

Screenshot 2023-04-14 at 13 31 32

Yes, seems Stata registered the UTI and it's not working.
commented

I do not see the full uti in the screenshot

com.stata.stata.do

image

commented

Implemented on release 2.1.19 (68).