Open mikavilpas opened 5 months ago
Nice to have, but I think it should use mine-type as the fallback rather than path as this will allow users to choose desired mime fetcher to meets their different needs
Or maybe only use mine-type (instead of the extension of current implementation) since it's more accurate and flexible
Hey, great project :)
I have a similar problem with $ file
returning
test.xopp: gzip compressed data, from Unix, original size modulo 2^32 8510711
which technically is correct. (yazi unzips it succesfully and data makes sense)
However I want these files (having a mimetype of application/x-xopp
) to be opened by xournalpp
As expected xdg-open
works just fine
What system are you running Yazi on?
macOS
What terminal are you running Yazi in?
Wezterm
Did you try the latest code to see if this problem got fixed?
Tried, but the problem still
yazi --debug
outputyazi.log doesn't show anything related to this
Describe the bug
Generally bat and yazi have similar results when highlighting a file. I noticed there are some special cases this isn't true: bat provides syntax highlighting but yazi does not highlight the syntax.
Expected Behavior
yazi shows syntax highlighting like bat
To Reproduce
For example, bat is able to highlight its own config file
But yazi shows this file as unhighlighted
Configuration
https://github.com/mikavilpas/dotfiles/blob/98e2c1122657a096425e7967a9a24c340f8f60b6/.config/yazi/yazi.toml?plain=1#L1
Anything else?
This seems to be a feature of bat, using the following heuristics that are based on file paths and names: https://github.com/sharkdp/bat/blob/c264ecd26b16ebb4f309db03d5a16b1f6e38ca67/src/syntax_mapping/builtins/README.md?plain=1#L1
I'm not sure what files are highlighted or not. As far as I can see, yazi just calls syntect to figure out what syntax should be used.
Do you think this should be fixed?