summaryrefslogtreecommitdiff
path: root/.config/nvim/init.vim
blob: 64277b9700bf7dfbda401c73fa16d367492154f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
"
"  g3tchoo's neovim config
"

" plugins
call plug#begin()

Plug 'itchyny/lightline.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'sheerun/vim-polyglot'
Plug 'preservim/nerdtree'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
Plug 'chriskempson/base16-vim'

call plug#end()

" options
set tabstop=2
set shiftwidth=2
set expandtab
set autoindent
set smartindent
set incsearch
set termguicolors

" functions
function! CocCurrentFunction() " for lightline
    return get(b:, 'coc_current_function', '')
endfunction

" keybinds
nnoremap <C-n> :NERDTreeToggle<CR>

" appearance
syntax on
filetype plugin indent on
set termguicolors
let base16colorspace=256
colorscheme base16-tomorrow-night
let g:lightline = {
      \ 'colorscheme': 'Tomorrow_Night',
      \ 'active': {
      \   'left': [ [ 'mode', 'paste' ],
      \             [ 'cocstatus', 'currentfunction', 'readonly', 'filename', 'modified' ] ]
      \ },
      \ 'component_function': {
      \   'cocstatus': 'coc#status',
      \   'currentfunction': 'CocCurrentFunction'
      \ },
      \ }
let g:NERDTreeGitStatusWithFlags = 1

" coc config
let g:coc_global_extensions = [
  \ 'coc-jedi',
  \ 'coc-rls',
  \ 'coc-clangd',
  \ 'coc-java',
  \ ]