catppuccin/bat

Booleans are red instead of peach

Closed this issue · 5 comments

Noticed that the theme sets the boolean color correctly to peach, but in the bat output all booleans are red.
Using catppuccin mocha.

Hey 👋,

Could you provide a sample file that highlights the booleans as red?

Thanks!

Hi, thanks for the reply. When i looked for it again I could not reproduce it, but some other things catched my eyes:

Yazi uses bat for its code-preview (and therefore the catppuccin bat-theme, because it is bat). They are almost the same on a lot of file formats, but in json i got this difference:

bat in YAZI
Screenshot 2024-08-02 at 16 58 34

bat CLI (in kitty on macos)
Screenshot 2024-08-02 at 16 58 53

I could only find this for json so far, every other format i tested was identical.

Also, the catppuccin theme for bat differs a lot from the catppuccin theme for neovim (with default settings):

PHP:

bat
Screenshot 2024-08-02 at 17 07 06

nvim
Screenshot 2024-08-02 at 17 07 29

JS:

bat
Screenshot 2024-08-02 at 17 09 47

neovim
Screenshot 2024-08-02 at 17 10 11

It is absolutely possible that this is coming from a bad configuration of my machine, so when you say everything seems fine i have to check my configs again. But at least im curious what you say about the YAZI difference.

Thank you!

@edit

Noticed that AstroVim loads for 1 sec the correct (identical with bat) colors, after 1 sec the inlayhints are loaded and after that the colors look like in my screenshot. So I would defenetly say there is something wrong in my config.

@edit2

found out that its about semantic highlighting (https://www.reddit.com/r/neovim/comments/12gvms4/this_is_why_your_higlights_look_different_in_90/). Since bat doesnt load any lsp it will look different in NeoVim.

They are almost the same on a lot of file formats, but in json i got this difference:

I'm a bit surprised at the difference in yazi vs using the CLI, maybe @uncenter has some insights into that difference since the highlights shouldn't change from bat and yazi 🤔

Also, the catppuccin theme for bat differs a lot from the catppuccin theme for neovim (with default settings):

I see that you've done some research yourself but it's worth mentioning that it's not just because semantic highlights is disabled. Bat and Neovim use entirely different theming engines/parsers, bat using textmate (hence why it's generated from vscode) and neovim using treesitter. It is impossible to make them identical 100% but we try our best!

I'll close this issue as the original error could not be reproduced. I'll most likely raise another issue for the JSON differences if that's something bat can fix on its end.

Hmm, one of your comparisons between Bat and Yazi showed different results on a JSON file - I'm not seeing that, the outputs of the two look exactly the same for me! Interstingly, your somehow different Yazi highlighting looks more correct compared to our VS Code port.

Yazi:
CleanShot 2024-08-05 at 10 29 00@2x

Bat:
CleanShot 2024-08-05 at 10 28 29@2x

VS Code:
CleanShot 2024-08-05 at 10 28 44@2x

@danscheer just to confirm you are using the latest version of our theme files for bat? How are you configuring it for bat? Do you have Yazi's syntect theme option pointing to the same file?