Which contains comment tokens, block and line, common language servers, special pairs, recognized shebangs, root scopes, etc.
It's mostly for use in one of my other projects, although you can see some of its higher aspirations one day in the README. Would love to collaborate with you and make it useful for a real use-case outside my own! If any of the information contained there could be useful! Reach out through an issue or through an email (linked in my github profile) if you're keen
I loveee hammerspoon. And had a subscription to OpenIn a bit back. Advanced scripting isn’t going to happen, even paging out to another script. Recently committed to Regex which would cover most of that. I’ll look into how it “fixes” old associations.
Walking back my regex commitment, just a heads-up/apology if you had your hopes up. Want this to stay as a CLI and not a dynamic app. Let me know if there's anything else you could see useful that would fit within that scope!
Walking this back, the API only allows setting this up for app bundles, which adds another layer of complexity I'm not down for. I want it to be a CLI tool, it doesn't need a helper or any other layers.
MacOS doesn't give any way to block an association from happening, I'm assuming they're using the same API's under the hood that Duti is using, and the only way you could block that from being accessed is by disabling the Launch services API.
In the next release of Infat, I'm introducing listing the openers from the plist (As you're doing now). If you record these values, then get their set defaults through infat, you could put those into your config and load from you config whenever they're overriden!
There is not, infat is subject to the limitations of Apple's API for setting handlers, which do not support passing in any data that an application could work with. If you wanted to, and have the time, I would recommend setting up a wrapper with https://github.com/sveinbjornt/Platypus with applescript. Then you could make an alternate for whichever mode you please and set it as an opener using infat. Clunky but functional.
It wouldn't be possible with the current interface, but I have a feeling it's possible. I'm thinking it's part of a new configuration option "type" that allows you to define openers for categories of files (text,video,etc.)
https://github.com/philocalyst/lang-config
Which contains comment tokens, block and line, common language servers, special pairs, recognized shebangs, root scopes, etc.
It's mostly for use in one of my other projects, although you can see some of its higher aspirations one day in the README. Would love to collaborate with you and make it useful for a real use-case outside my own! If any of the information contained there could be useful! Reach out through an issue or through an email (linked in my github profile) if you're keen