NLKNguyen / papercolor-theme

:art: Light & Dark Vim color schemes inspired by Google's Material Design
MIT License
2.72k stars 239 forks source link

PaperColor theme breaks YouCompleteMe syntax completion #85

Open markwu opened 7 years ago

markwu commented 7 years ago

I use YouCompleteMe as my completion engine, it will collect my tags and syntax keywords as completion source.

I just found, if I use PaperColor as my color scheme, it will break YouCompleteMe syntax keywords completion.

Here comes the minimal vimrc for testing:

set nocompatible
filetype off

execute 'source ~/.vim/bundle/vim-plug/plug.vim'
call plug#begin('~/.vim/bundle/')

Plug 'junegunn/vim-plug'

" Put your bundle below here
Plug 'Valloric/YouCompleteMe', {'do': 'git submodule update --init --recursive && python install.py'}
Plug 'shawncplus/phpcomplete.vim'
Plug 'NLKNguyen/papercolor-theme'
" Put your bundle above here

call plug#end()

syntax on
filetype plugin indent on

" Put your plugin settings below here
" completor
colorscheme PaperColor

set completeopt-=preview
set completeopt+=menu,menuone,noinsert,noselect
set shortmess+=c

let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_collect_identifiers_from_tags_files = 1

let g:ycm_key_list_select_completion = ['<TAB>', '<C-N>', '<Down>']
let g:ycm_key_list_previous_completion = ['<S-TAB>', '<C-P>', '<Up>']
let g:ycm_key_invoke_completion = '<C-F>'
"Put your plugin settings above here

You can repeat the following steps to reproduce this bug (Disable papercolor theme first):

  1. vim test.php and hit <i> go to insert mode
  2. Type <?php and hit <Enter>
  3. Type flie_
  4. After that, you should get bunch of completion candidates
  5. Exit vim and enable colorscheme PaperColor. Repeat the test from step 1 again. You will found you can't get syntax keywords like previous test.

It is a really weird bug.

markwu commented 7 years ago

Here comes the screenshots:

Without PaperColor theme 2017-02-23 11 43 03

With PaperColor theme 2017-02-23 11 43 40

Forgot to mention my environment: OS: MacOS Sierra 10.12.3 vim: MacVim 8.0.329

NLKNguyen commented 7 years ago

I'll look into it. Somehow I missed the notification of this post.