New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pattern matching in node_type
#194
Comments
Pattern matching might be a little difficult to implement and might have performance costs. But I think it'll be possible to implement nested mime types. E.g.
|
I'm curious, what would be difficult to implement here? As for performance, have you considered a cache, to search only once the settings for a given mime type, and always use the same on subsequent needs? |
Going through the keys and matching patterns efficiency. From O(1) it becomes O(n) |
Sounds cool. Can you please provide a minimal prototype implementation for xplr? |
Not anytime soon, I'm a Rust beginner who happen to have a few ideas from times to times, but not enough time to do them ATM. 馃憖 My comment was mainly to give an idea in case you didn't thought about it, but I won't contribute code for now |
No issues 馃憤 |
Going with the no-pattern matching logic. You can defing mime types like xplr.config.node_types.mime_essence["video"] = {
["*"] = {
meta = { icon = "馃摻" },
}
} |
I think the issue is solved. Hence closing this. |
for exampe
to match all video types
The text was updated successfully, but these errors were encountered: