]> git.cameronkatri.com Git - dotfiles.git/blob - .config/nvim/init.vim
Set PATH in .login_conf
[dotfiles.git] / .config / nvim / init.vim
1 call plug#begin()
2 Plug 'airblade/vim-gitgutter'
3 Plug 'vim-airline/vim-airline'
4 Plug 'neoclide/coc.nvim', {'branch': 'release'}
5 Plug 'dhruvasagar/vim-table-mode'
6 Plug 'chrisbra/Colorizer'
7 Plug 'octol/vim-cpp-enhanced-highlight'
8 Plug 'arcticicestudio/nord-vim'
9 Plug 'junegunn/fzf.vim'
10 Plug 'rhysd/git-messenger.vim'
11 Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
12 call plug#end()
13
14 let g:coc_global_extensions = [
15 \'coc-pairs',
16 \'coc-json',
17 \'coc-clangd',
18 \]
19
20 set number
21 colorscheme nord
22
23 set tabstop=2
24 set softtabstop=2
25 set shiftwidth=2
26 set list lcs=tab:\¦\
27 set noexpandtab
28 set completeopt-=preview
29 set cursorline
30
31 tnoremap <Esc> <C-\><C-n>
32
33 " use <tab> for trigger completion and navigate to the next complete item
34 function! s:check_back_space() abort
35 let col = col('.') - 1
36 return !col || getline('.')[col - 1] =~ '\s'
37 endfunction
38
39 inoremap <silent><expr> <Tab>
40 \ pumvisible() ? "\<C-n>" :
41 \ <SID>check_back_space() ? "\<Tab>" :
42 \ coc#refresh()
43
44 let g:airline_skip_empty_sections = 1
45 let g:airline_section_warning = ''
46 let g:airline_section_x=''
47 let g:airline_section_z = airline#section#create(['%3p%% ', 'linenr', ':%c'])
48 let g:airline#parts#ffenc#skip_expected_string='utf-8[unix]'
49 let g:airline#extensions#tabline#enabled = 1
50 let g:airline#extensions#tabline#buffer_min_count = 2 " show tabline only if there is more than 1 buffer
51 let g:airline#extensions#tabline#fnamemod = ':t' " show only file name on tabs
52 let airline#extensions#coc#error_symbol = '✘:'
53 let airline#extensions#coc#warning_symbol = '⚠:'
54 if !exists('g:airline_symbols')
55 let g:airline_symbols = {}
56 endif
57 let g:airline_symbols.linenr = ''
58 let g:airline_symbols.branch = '⎇ '
59 let g:airline_symbols.dirty= ''