summaryrefslogtreecommitdiff
path: root/mac/.config/yazi/plugins.bak/mime-ext.yazi/README.md
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-13 17:11:00 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-13 17:11:00 +0900
commit2e6d3671d0e01ff5751893075e7fc5c53b288f95 (patch)
tree2ddc56faa7befe47996fe9bdbe61795401d98987 /mac/.config/yazi/plugins.bak/mime-ext.yazi/README.md
parentedc0ccf1622788bc1051ab08a54378c36ac785f1 (diff)
deleted yazi/flavors, deleted yazi/plugins, created flavors.bak/, created plugins.bak/
Diffstat (limited to 'mac/.config/yazi/plugins.bak/mime-ext.yazi/README.md')
-rw-r--r--mac/.config/yazi/plugins.bak/mime-ext.yazi/README.md56
1 files changed, 56 insertions, 0 deletions
diff --git a/mac/.config/yazi/plugins.bak/mime-ext.yazi/README.md b/mac/.config/yazi/plugins.bak/mime-ext.yazi/README.md
new file mode 100644
index 0000000..3c2ee1f
--- /dev/null
+++ b/mac/.config/yazi/plugins.bak/mime-ext.yazi/README.md
@@ -0,0 +1,56 @@
+# mime-ext.yazi
+
+A mime-type provider based on a file extension database, replacing the [builtin `file(1)`](https://github.com/sxyazi/yazi/blob/main/yazi-plugin/preset/plugins/mime.lua) to speed up mime-type retrieval at the expense of accuracy.
+
+See https://yazi-rs.github.io/docs/tips#make-yazi-even-faster for more information.
+
+## Installation
+
+```sh
+ya pkg add yazi-rs/plugins:mime-ext
+```
+
+## Usage
+
+Add this to your `~/.config/yazi/yazi.toml`:
+
+```toml
+[[plugin.prepend_fetchers]]
+id = "mime"
+name = "*"
+run = "mime-ext"
+prio = "high"
+```
+
+## Advanced
+
+You can also customize it in your `~/.config/yazi/init.lua` with:
+
+```lua
+require("mime-ext"):setup {
+ -- Expand the existing filename database (lowercase), for example:
+ with_files = {
+ makefile = "text/makefile",
+ -- ...
+ },
+
+ -- Expand the existing extension database (lowercase), for example:
+ with_exts = {
+ mk = "text/makefile",
+ -- ...
+ },
+
+ -- If the mime-type is not in both filename and extension databases,
+ -- then fallback to Yazi's preset `mime` plugin, which uses `file(1)`
+ fallback_file1 = false,
+}
+```
+
+## TODO
+
+- Add more file types (PRs welcome!).
+- Compress mime-type tables.
+
+## License
+
+This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.