diff options
author | Marco Hinz <mh.codebro@gmail.com> | 2019-04-20 19:02:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-20 19:02:19 +0200 |
commit | 43356a43d00ff69e90afd5186e066b4d27b66d9d (patch) | |
tree | 0eef16c03b95a458b093798c65478ba5d4e3bb39 | |
parent | 3f712185058f7dca9fded0d49b333929d3f8558d (diff) | |
download | rneovim-43356a43d00ff69e90afd5186e066b4d27b66d9d.tar.gz rneovim-43356a43d00ff69e90afd5186e066b4d27b66d9d.tar.bz2 rneovim-43356a43d00ff69e90afd5186e066b4d27b66d9d.zip |
health: check if tmux enabled true colors (#9929)
References https://github.com/neovim/neovim/issues/7764
-rw-r--r-- | runtime/autoload/health/nvim.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/autoload/health/nvim.vim b/runtime/autoload/health/nvim.vim index efa3292801..8fcea2e941 100644 --- a/runtime/autoload/health/nvim.vim +++ b/runtime/autoload/health/nvim.vim @@ -170,6 +170,17 @@ function! s:check_tmux() abort \ ["Set default-terminal in ~/.tmux.conf:\nset-option -g default-terminal \"screen-256color\"", \ s:suggest_faq]) endif + + " check for RGB capabilities + let info = system('tmux server-info') + let has_tc = stridx(info, " Tc: (flag) true") != -1 + let has_rgb = stridx(info, " RGB: (flag) true") != -1 + if !has_tc && !has_rgb + call health#report_warn( + \ "Neither Tc nor RGB capability set. True colors are disabled. |'termguicolors'| won't work properly.", + \ ["Put this in your ~/.tmux.conf and replace XXX by your $TERM outside of tmux:\nset-option -sa terminal-overrides ',XXX:RGB'", + \ "For older tmux versions use this instead:\nset-option -ga terminal-overrides ',XXX:Tc'"]) + endif endfunction function! s:check_terminal() abort |