Closed lhpaoletti closed 1 year ago
I'm glad to share more information if needed. I'd be really grateful for any help, because I loved this color scheme!
Hey there! Unfortunately Terminal.app has a limited set of colors it supports. I would recommend iTerm2 for something a little simpler to setup or Kitty terminal. Happy to answer any questions about either. Feel free to join our Discord with questions too :)
I think not.. I just tested it with this script from [https://www.commandlinefu.com/commands/view/6533/print-all-256-colors-for-testing-term-or-for-a-quick-reference](this website) and it has the expected output for a 256-color terminal:
So I think that the problem might be something else here, right?
And I don't have an idea how to better name this issue, but maybe someone here does. I think that there should be a better, more general naming for this issue.
Sorry, just to clarify is your latest screenshot in Terminal.app or another terminal? Our theme won't work in terminal.app but should in iterm2, kitty, etc. and if those are not working for you I'm happy to explore further
TL;DR - Doesn't look like a bug in rose-pine. Same issue with other colorschemes. The macOS Terminal.app doesn't support 24-bit color. Switching to iTerm2 fixes the issue.
I ran into this as well on the macOS Terminal.app.
I first assumed that it was an issue with this colorscheme and tried out some other colorschemes. However, I saw the same problem using other colorschemes, which made me start to think that the issue was either in my configuration or in my Terminal. Messed around with my config a bit, but that didn't help either.
Also, several forums recommended switching to a different app like iTerm2, Kitty, etc. because macOS' Terminal.app doesn't have the required color support yet.
Switching to iTerm2 fixed the issue for me.
Here are some screenshots showing the rose-pine and onedark themes in iTerm2 (left) and Terminal.app (right).
Theme | Screenshot |
---|---|
rose-pine | |
onedark |
I think this is caused by the macOS Terminal.app not supporting 24-bit color, and not related to xterm-256color
. The value of the $TERM
env variable is xterm-256color
in both iTerm2 and Terminal.app. However, running this script to test 24-bit color support shows that iTerm2 supports 24-bit color, whereas the macOS Terminal does not. Here's a screenshot showing this:
Here's a StackOverflow question that mentions something similar: https://stackoverflow.com/questions/58674310/nvim-in-macos-terminal-breaks-on-displaying-termguicolors
It's a little annoying, but this seems to be a macOS Terminal.app problem, not a rose-pine problem.
Hope this helps!
If this is an issue outside of Terminal.app let me know and we can reopen
Although it doesn't fully match our theme, it is possible via mini.colors to infer cterm values (e.g. enable support for non true color terminals):
-- Requires `rose-pine/neovim` and `echasnovski/mini.colors`
vim.cmd.colorscheme("rose-pine")
require("mini.colors").get_colorscheme():add_cterm_attributes():apply()
vim.opt.termguicolors = false
@mvllow @syncerax Thank you so much for your help! I'll try iTerm2 out and if I encounter any problems I'll mention it here again. 👍
Actually, color will show correctly under tmux in Terminal.app
That is not the case for my setup. Running the following in a fresh tmux instance doesn't apply my colorscheme.
tmux kill-server
tmux
nvim
@mvllow oh, forgot to mention. You should have this in your ~/.tmux.conf
set -g default-terminal "xterm-256color"
I'm having problems with setting the
colorscheme
on Neovim torose-pine
. I use the Terminal app from macOS running zsh, and I can't seem to find any helpful issues here or posts on any of the goto help websites. Maybe this could be because I don't understand Lua enough, and am doing something wrong, but what I'm doing is: make theuse
-statement in mypacker.lua
, which is in a subdirectory (which I'll callsubdir
) within the~/.config/nvim/lua
directory. Then, from the~/.config/nvim/init.lua
file I dorequire("subdir")
at the top level. In thesubdir/init.lua
I haverequire("subdir.packer")
written. Now, when I do:colorscheme rose-pine
, I get this horrendous look:As the subject of this issue says, the
$TERM
env-variable is set toxterm-256color
. I don't know if it's relevant, but I do also have a~/.vimrc
file.