Giter Club home page Giter Club logo

Comments (4)

sainnhe avatar sainnhe commented on July 18, 2024

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.

from edge.

 avatar commented on July 18, 2024

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 ""'

from edge.

sainnhe avatar sainnhe commented on July 18, 2024

Add this before colorscheme edge

set termguicolors

from edge.

sainnhe avatar sainnhe commented on July 18, 2024

Closed.

from edge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.