qlstephen icon indicating copy to clipboard operation
qlstephen copied to clipboard

Doesn't work for YAML files *.yml

Open ghost opened this issue 4 years ago • 2 comments

ghost avatar Dec 22 '20 20:12 ghost

Work-around inspired by https://github.com/whomwah/qlstephen/issues/87#issuecomment-831399689 :

Edit the Info.plist inside the QLStephen.qlgenerator in your favorite text editor and look for the following block:

			<key>LSItemContentTypes</key>
			<array>
				<string>public.data</string>
				<string>public.content</string>
			</array>

I managed to get both CSS and YAML to work by adding their UTI types as follows:

			<key>LSItemContentTypes</key>
			<array>
				<string>public.data</string>
				<string>public.content</string>
				<string>public.css</string>
				<string>public.yaml</string>
			</array>

Then I reloaded the QuickLook cache with qlmanage -r and qlmanage -r cache (in the Terminal app).

If adding the entry to Info.plist didn't seem to work, double check the UTI type for YAML files with the following command (in the Terminal app):

$ mdls -name kMDItemContentType ~/path/file.yml
kMDItemContentType = "public.yaml"

Where ~/path/file.yml is the path to the YAML file, and public.yaml is the part of my specific output that I used.

visnetje avatar Jul 15 '21 17:07 visnetje

+1 This would be great as an out of the box support. With so much software doing config via YAML (.yaml, .yml) this was actually the primary support I was looking for.

Adding .css also and honestly just about any developer related file extension seems a good idea.

benjaminapetersen avatar Nov 17 '22 15:11 benjaminapetersen