Simple Application that registers Vapor Leaf's .leaf file type to LaunchServices as html enabling automatic syntax highlighting in Xcode.

Overview

Vapor Leaf Extension

Update: The Vapor Leaf Extension is now meant to be used with the Xcode Plugin I designed to provide Xcode language support for the Vapor Leaf language. The version for HTML syntax support only can be found in the dedicated branch.

Vapor Leaf Plugin

Download and set up the Vapor Leaf Plugin for custom syntax highlighting and indentation for Leaf tags with HTML tags.

 

Vapor Leaf Extension

This Application registers Vapor Leaf's .leaf file type to LaunchServices adding custom file icon for the file type inside Xcode and in the Finder. Download and run just once for desired result.

 

 

To create your own custom icon follow the Apple Developer Documentation: Design and implement macOS document icons

Important: Make sure to avoid registering the Document Type Identifier before you have your icon perfect. Once the file type is registered, it is very hard to reset. I had to rebuild my LaunchServices database using Onyx to reset it. Remove the document type preset in the project by deleting the "Document types" key from the project's Info.plist.

Tips: LaunchServices is where the file association is stored. The association is easily unregistered while Document Type has not been registered. Once the Document Type was registered I found very hard to reset. Below are 2 command line code snippets that helped me while I was trying to design the icon.

View all LaunchServices associations: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump

Command-F to search for file type, .leaf in this case. Once you find the path name for the project that registered this file type you can unregister it: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -u

You might also like...
The demo app demonstrates a real-time application using FindSurface to search point clouds, which ARKit provides, for geometry shapes.
The demo app demonstrates a real-time application using FindSurface to search point clouds, which ARKit provides, for geometry shapes.

FindSurface-GUIDemo-iOS (Swift) CurvSurf FindSurface™ GUIDemo for iOS (Swift) Overview This demo app demonstrates a real-time application using FindSu

OMDburner is a free and Open Source Application developed using Swift.
OMDburner is a free and Open Source Application developed using Swift.

OMDburner is a free and Open Source Application developed using Swift.

Pre-work: A tip calculator application for iOS
Pre-work: A tip calculator application for iOS

Pre-work - Tip Calculator Tip Calculator is a tip calculator application for iOS. Submitted by: Jonathan Ballona Sanchez Time spent: 7 hours spent in

Instagram Clone Application Built Using Swift And Firebase
Instagram Clone Application Built Using Swift And Firebase

InstagramClone Bu instagram klon uygulamasında CoreLocation, Snapkit, Firebase, KingFisher, IQKeyboardManagerSwift kütüphaneleri kullanılmıştır. Kulla

Weather Forecast Assigment is an iOS application built to highlight MVP and Clean Architecture concepts

Weather Forecast Assigment - iOS - MVP + Clean Architecture Description Weather Forecast Assigment is an iOS application built to highlight MVP (Model

iOS Application that gets the trending repositories data from Github API and displays it in a tableView.

Github-Trending-Repos iOS Application that gets the trending repositories data from Github API and displays it in a tableView. Follows MVC architectur

Walk! Is an application developed for FIT3178 (iOS App Development)'s Final Assignment
Walk! Is an application developed for FIT3178 (iOS App Development)'s Final Assignment

WalkWalkWalk- Walk, Walk, Walk! Is an application developed for FIT3178 (iOS App Development)'s Final Assignment, S1 2021 Monash University. Created b

iOS Application for independent film theatre (ArtHouse Momo)
iOS Application for independent film theatre (ArtHouse Momo)

iOS Application for independent film theatre (ArtHouse Momo)

Flix is a film rating application for iOS.

Flix is a film rating application for iOS.

Comments
  • Remove Editor role since .leaf file cannot be open by this app

    Remove Editor role since .leaf file cannot be open by this app

    1. Remove Editor role since this app cannot read nor edit .leaf file Set it to none make all other things working as expected

    Except the quicklook window will no longer recommend using this app to open it. Instead it will use the default "text editor app"(since it is the default public.text editor app, I guess) And if needed user can then set always open it using Xcode or VSCode

    1. Add text/html mime-type
    opened by Kyle-Ye 13
  • How to unregister file type association

    How to unregister file type association

    Before this implementation, I did another simple implementation(see https://github.com/vapor/leaf/issues/189).

    And it seemed I cannot remove it.

    The workaround in README seems not work.

    View all LaunchServices associations: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump Command-F to search for file type, .leaf in this case. Once you find the path name for the project that registered this file type you can unregister it: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -u

    Because in 'lsregister -dump' it has been unregistered, but it can still be seen using mdls -name kMDItemContentTypeTree ./xx.leaf

    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | fzf 截屏2021-04-13 09 46 42

    截屏2021-04-13 09 45 12

    Any suggestions? Thanks

    opened by Kyle-Ye 3
Releases(v2.0)
Owner
Omran Khoja
iOS Mobile Engineer. Currently attending City University of NY where I am studying Computer Science.
Omran Khoja
Demo Vapor TIL App

Demo Vapor TIL App

yoki 0 Nov 21, 2021
LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture

LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture

Ahmed Nasser 5 Jun 9, 2022
Example Xcode swift iOS project for Core Data + iCloud syncing

iCloudCoreDataStarter Hello, I'm Chad. For the last several months I have been working on Sticker Doodle, an app you should go download right now! In

Chad Etzel 521 Dec 27, 2022
iOS NBA Challenge Based on Xcode 12.4, PR2S Project By: Oscar Pastás

iOS NBA Challenge Based on Xcode 12.4, PR2S Project By: Oscar Pastás iOS This test app consists of a list of users Considerations This test should be

null 0 Nov 26, 2021
The "Ask Me" is simple iOS application which shows answer on the screen everytime when the user press the ask button

The "Ask Me" is simple iOS application which shows answer on the screen everytime when the user press the ask button. This application is build and design by Chetan Parate using Xcode and Swift.

Chetan Parate 0 Oct 27, 2021
A simple application display album artwork from the iTunes API

iTunesTestApp In the test task, you need to develop a simple application for the iPhone. The application should display album artwork from the iTunes

Valery Veselov 1 Nov 2, 2021
A simple application for watching movies

A simple application for watching movies

Roman 1 Jun 10, 2022
Simple SwiftUI application that allows users to find the resistance value of any four-band resistor by inputting the colors of the bands on the resistors.

Resistor-Finder Simple SwiftUI application that allows users to find the resistance value of any four-band resistor by inputting the colors of the ban

Aaditya Shah 0 Dec 23, 2021
Exchanger - a simple iOS application demonstrating one of approaches to implement VIPER 💎 architecture in modern Objective-C

The Exchanger is a simple iOS application demonstrating one of approaches to implement VIPER ?? architecture in modern Objective-C.

Vladimir Kaltyrin 11 Oct 11, 2022
A simple application to view your exact hardware on macOS

A simple application to view your exact hardware on macOS. Similar to About This Mac, but with more features, including AMD Processor Support, display resolution, and more! Works on both Hackintoshes and real Macs!

0xCUBE 25 Dec 20, 2022