sainnhe / edge

Clean & Elegant Color Scheme inspired by Atom One and Material
MIT License
884 stars 57 forks source link

Lightline Theme is not working on Neovim #2

Closed ghost closed 5 years ago

ghost commented 5 years ago

After installing lightline and your theme i was setting this in my ~/.config/nvim/init.vi file:

" theme settings 
set background=dark
colorscheme edge

" lightline settings
let g:lightline = {}
let g:lightline.colorscheme = 'edge'

But the result looks like this: 2019-09-03-161543_1919x1079_scrot

Any help would be appreciated! I really like this theme. Thanks, in advice.


Neovim version:

Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wconversion -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-p
rotector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.3.8/src -I/
usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser
sainnhe commented 5 years ago

I'm using neovim nightly build, but I can't reproduce this in my neovim with lightline.

Please make sure you have installed lightline correctly, try buildin theme and see if it works:

let g:lightline = {
      \ 'colorscheme': 'wombat',
      \ }

If the buildin theme works but this theme still doesn't work, maybe you can consider sharing your vimrc.

ghost commented 5 years ago

Thanks for quick response!

I think lightline is installed correctly. The wombat theme (an all other themes provided by lightline are also working properly).

I installed your theme and lightline via vimplug. Here is my init.vim:

call plug#begin('~/.vim/plugged')

" tools 
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug '/usr/local/opt/fzf'
Plug 'junegunn/fzf.vim'
Plug 'itchyny/lightline.vim'
Plug 'junegunn/vim-easy-align'
Plug 'mcchrish/nnn.vim'

" themes 
Plug 'sainnhe/edge'
Plug 'morhetz/gruvbox'

" syntax highlight
Plug 'pangloss/vim-javascript' 
Plug 'leafgarland/typescript-vim' 
Plug 'jparise/vim-graphql'

" code completion 
Plug 'neoclide/coc.nvim', {'branch': 'release'}

call plug#end()

set rnu nu
set cursorline
set mouse=a
set noshowmode
set cmdheight=2
set updatetime=300
set shortmess+=c
set signcolumn=yes
set tabstop=2

syntax on

" key bindings 
noremap <leader><tab>   :NERDTreeToggle<cr>
noremap <leader>o       :NERDTree<space>
noremap <leader>^       :NERDTreeFind<cr>
noremap <leader><space> :Files<cr>
noremap <leader>F       :Files<space>
noremap <leader>l       :Lines<cr>
noremap <leader>y       "+y
noremap <leader>p       "+p
noremap <leader>b       :NnnPicker<cr>
noremap <leader>s       :Rg<space>
noremap <leader><esc>   :noh<cr>

xmap ga <Plug>(EasyAlign)

" coc settings

" Use tab for trigger completion with characters ahead and navigate.
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"

function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1]  =~# '\s'
endfunction

" Use <c-space> to trigger completion.
inoremap <silent><expr> <c-space> coc#refresh()

" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
" Coc only does snippet and additional edit on confirm.
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"

" Use `[c` and `]c` to navigate diagnostics
nmap <silent> [c <Plug>(coc-diagnostic-prev)
nmap <silent> ]c <Plug>(coc-diagnostic-next)

" Remap keys for gotos
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)

" Use K to show documentation in preview window
nnoremap <silent> K :call <SID>show_documentation()<CR>

function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction

autocmd CursorHold * silent call CocActionAsync('highlight')

nmap <leader>rn <Plug>(coc-rename)

" Using CocList
" Show all diagnostics
nnoremap <silent> <space>a  :<C-u>CocList diagnostics<cr>
" Manage extensions
nnoremap <silent> <space>e  :<C-u>CocList extensions<cr>
" Show commands
nnoremap <silent> <space>c  :<C-u>CocList commands<cr>
" Find symbol of current document
nnoremap <silent> <space>o  :<C-u>CocList outline<cr>
" Search workspace symbols
nnoremap <silent> <space>s  :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent> <space>j  :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent> <space>k  :<C-u>CocPrev<CR>
" Resume latest coc list
nnoremap <silent> <space>p  :<C-u>CocListResume<CR>

" NERDTree settings 
let g:NERDTreeChDirMode=1
let g:NERDTreeShowHidden=1

" theme settings 
set background=dark
colorscheme edge

" lightline settings
let g:lightline = {
\ 'colorscheme': 'edge',
\ }

hi Normal       ctermbg=none
hi EndOfBuffer  ctermbg=none
hi SignColumn   ctermbg=none
hi LineNr       ctermbg=none
hi CursorLineNr ctermbg=none

" hightlight chars at 80 length
highlight OverLength ctermfg=red 
match OverLength /\%81v.\+/

" fzf settings 
let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g ""'
sainnhe commented 5 years ago

Add this before colorscheme edge

set termguicolors
sainnhe commented 5 years ago

Closed.