joshdick / onedark.vim

A dark Vim/Neovim color scheme inspired by Atom's One Dark syntax theme.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

onedark.vim is not applied to the terminal buffer in nvim.

winston0410 opened this issue · comments

Terminal Emulator Info

zsh --version
zsh 5.8 (x86_64-apple-darwin18.7.0)

Output From vim --version

vim --version
NVIM v0.4.4

Issue Description

I am using nvim, and onedark has applied to vim correctly. However when I use the terminal inside nvim, it is using a weird color scheme and it is not affected by onedark.

I have checked the readme and I cannot find related information. Does onedark.vim support theming for terminal buffer?

This is my init.vim

"Specify a directory for plugins"
call plug#begin('~/.config/nvim/plugged')

"Neovim theme"
Plug 'joshdick/onedark.vim'
"Lightline vim"
Plug 'itchyny/lightline.vim'
"Multiple language support"
Plug 'sheerun/vim-polyglot'
"Togglable terminal"
Plug 'caenrique/nvim-toggle-terminal'
Plug 'machakann/vim-sandwich'
Plug 'easymotion/vim-easymotion'
"NerdTree File Menu"
Plug 'preservim/nerdtree' | 
	\ Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'ryanoasis/vim-devicons'
"ALE"
Plug 'maximbaz/lightline-ale'
Plug 'dense-analysis/ale'
"Git"
Plug 'https://github.com/airblade/vim-gitgutter.git'
"Comment out code"
Plug 'preservim/nerdcommenter'
Plug 'camspiers/lens.vim'

"Initialize plugin system"
call plug#end()
"Make NerdTree shows all hidden files"
let NERDTreeShowHidden=1
let g:NERDTreeWinPos = "left"
let NERDTreeMinimalUI=1
"Make the bracket surrounding icon disappear"
if exists("g:loaded_webdevicons")
	call webdevicons#refresh()
endif

source /Users/hugosum/.config/nvim/values.vim
source /Users/hugosum/.config/nvim/keymap.vim

let g:ale_fix_on_save = 1
"onedark theme"
syntax on
colorscheme onedark
set guifont=HackNerdFontCompleteM-Regular:h22

I'm having a similar issue with regular vim (not neovim) adding unlet g:terminal_ansi_colors right after colorscheme onedark in my .vimrc fixes it for me.

I just merged #297 which should resolve this issue.

onedark.vim previously included custom terminal buffer colors for standard Vim, but #297 added them for Neovim as well.

In both standard Vim and Neovim, set termguicolors is needed for onedark.vim's custom terminal buffer colors to have any effect.

@pvarin Adding unlet g:terminal_ansi_colors essentially remove's onedark.vim's custom terminal colors.