SourceCodeSyntaxHighlight icon indicating copy to clipboard operation
SourceCodeSyntaxHighlight copied to clipboard

How to preview text-based file like 'go.mod"

Open programervn opened this issue 4 years ago • 3 comments

This app work great for source code file, How to handle other text-based file, for example, I use Go, and project always have go.mod file, but cannot previews this file type, can I add this file type to preview?

image

programervn avatar Oct 29 '21 09:10 programervn

I'm unsure whether to enable support for these files. MacOs identifies files based on their UTI which is derived from the file extension. To support these files, all files with .mod and .sum extension would be handled even if their name is not go.

On my system .mod files are recognized as MOD Audio File (org.videolan.mod) and associated to VLC.

sbarex avatar Nov 08 '21 09:11 sbarex

@sbarex I agree that having built-in support for extensions that may mean different things (.mod go file or a .mod)

Is it possible to extend the rule matching for files without extension to files even with extension - this would allow users to customise such behaviour for themselves.

dufferzafar avatar Jul 16 '22 08:07 dufferzafar

No, is not possible, see https://github.com/sbarex/SourceCodeSyntaxHighlight/issues/170#issuecomment-1186195750

sbarex avatar Jul 16 '22 14:07 sbarex