I'm trying to use vim-material theme from https://github.com/kaicataldo/material.vim
Below is what happens when i run neovim in tmux
Below is what it should look like
What i've tried so far:
in my .tmux.conf I tried both
set -g default-terminal "screen-256color"
and
set -g default-terminal "xterm-256color"
I also tried
TERM=screen-256color-bce tmux
I am able to echo $TERM with proper results here. but i've also tried setting them manually with export TERM=xterm-256color
or export TERM=screen-256color
before i open nvim
This is what I have in my init.vim
let g:material_theme_style = 'ocean'
colorscheme material
set background=dark
set t_Co=256
set termguicolors
i've tried setting and unsetting these. unsetting termguicolors was the worst, the theme just didnt work and it gave me default vim look
I also run tmux as tmux -2
i should also mention i kill tmux sessions after changing anything in my tmux.conf to make sure it reflects
the versions of related apps and os
nvim v0.4.3
tmux 3.0a
iTerm2 3.3.9
macOS mojave 10.14.6
EDIT:
I've since tried clearing all tmux plugins and nvim plugins only leaving the default-terminal in my tmux config
Here's what's left on my init.vim file
call plug#begin('~/.config/nvim/plugged')
Plug 'kaicataldo/material.vim'
call plug#end()
set termguicolors
let g:material_theme_style = 'default'
colorscheme material
I also tried downloading an older version of tmux. 2.5, still no luck.
I deleted all my tmux plugins and nvim plugins and reinstalled material.vim so i'm sure nothing is conflicting in the plugins somehow
4条答案
按热度按时间iaqfqrcu1#
找到解决方案。这篇文章帮助我:https://cyfyifanchen.com/neovim-true-color/
insrf1ej2#
.tmux.conf
中的set-option -ga terminal-overrides ",xterm-256color:Tc"
和.bashrc
中的alias tmux="TERM=screen-256color-bce tmux"
在windows WSL2中使用windows终端为我工作。现在我可以在tmux中使用vim:)mtb9vblg3#
Just change the
TERM
environment variable in your shell config file, in my case.zshrc
, i.e:Reload your terminal and reload tmux or kill tmux-server and check:
dhxwm5r44#
我在neovim中运行了
h: checkhealth
,当我在一个tmux会话中使用neovim时,我只得到了一个错误消息。checkhealth消息为我提供了唯一有效的解决方案。它是这样说的: