Closed RelativeAlbatros closed 2 years ago
Hi @ZigZag35 :wave:
In order to ensure the problem is related to the Nord theme you need to reproduce it with a minimal and clean configuration. This can be done by creating new configuration file with any name (e.g. testrc
) and run Vim with the following command: vim -u testrc
For me as a theme author it is not possible to know if the theme is the root cause of the problem when there are other attributes set in the configuration because each one might break the theme.
Here's an minimal test configuration you can use to try to reproduce the problem (supposed you're using vim-plug):
call plug#begin(expand('~/.vim/plugged'))
Plug 'arcticicestudio/nord-vim'
call plug#end()
set nocompatible
if (has("termguicolors"))
set termguicolors
endif
syntax enable
colorscheme nord
This is because, like described in arcticicestudio/nord#94, the actual color palette hasn't changed but only ports that are targeted to applications with syntax highlighting.
As you can see in the example configuration I've added the termguicolors
settings which could be one reason why the color is not rendered correctly. This is because the *_term
attributes make use of the colors that are provided by the terminal color scheme which might be for example iTerm2 or Tilix. The *_gui
variables on the other side are used when Vim runs in GUI mode. So in order to run Vim in a terminal but use colors like in GUI mode the termguicolors
variable must be set and your terminal emulator must support “true colors“ (24bit).
Unfortunately terminal colors are quite complex due to their long history, but modern terminal emulators should be all capable of rendering "True Colors". You should make sure to check out the great “Terminal Colors“ gist that provides many details about color rendering in terminal emulators, tracking of supported terminal emulator projects and answers to common confusions about terminal colors. The “Colours in terminal“ gist is also quite helpful to learn more about the actual rendering engines and standards used by these terminal emulators. There are also a lot of blog posts like this and this one that help to handle different use case with various terminal emulators in combination with different CLI and TUI applications.
Could you please try to either use the example configuration or set the termguicolors
setting in your current configuration and check whether colors are then displayed correctly?
hello, I should've added that I'm using neovim on st terminal emulator. I've followed this page from the arch wiki: https://wiki.archlinux.org/title/st#256color_and_truecolor_support_not_working_in_tmux_or_otherwise my .nvimrc now has
set t_Co=256 " Enable 256 colors
if (has("termguicolors"))
set termguicolors
endif
C comments are displayed correctly now with/without tmux. the only difference is the bg color being more bright inside tmux but that isn't an issue.
Thank you for your support :D
Nice to hear that it works now and thanks for posting your solution. The problem with st in combination with Vim and tmux has been a problem reported often in this repository as well as the solution, but the link to the section of the Arch Linux wiki page is perfect to be included in the Nord Docs 👍🏼
I'm using st terminal with a nord0 background. comments are hardly seen.