Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- filetype indent on
- filetype plugin on
- syntax on
- set secure
- set exrc
- set expandtab
- set tabstop=4
- set shiftwidth=4
- set smartindent
- set copyindent
- set smarttab
- set number relativenumber
- set signcolumn=yes
- set cursorline
- set undodir=~/.config/nvim/undo
- set undofile
- set nobackup
- set nowritebackup
- set shortmess+=Ic
- set foldmethod=syntax
- set foldlevel=99
- nnoremap <tab> za
- set mouse=a
- set updatetime=300
- set hidden
- set smartcase
- set completeopt+=preview
- set termguicolors
- nnoremap <silent> <esc> :noh<cr><esc>
- nnoremap <silent> <space> :FZF<cr>
- "Plugins{{{
- call plug#begin('~/.config/nvim/plugged')
- Plug 'chriskempson/base16-vim'
- Plug 'octol/vim-cpp-enhanced-highlight'
- Plug 'jeffkreeftmeijer/vim-numbertoggle'
- Plug 'jiangmiao/auto-pairs'
- Plug 'ludovicchabant/vim-gutentags'
- Plug 'tpope/vim-unimpaired'
- Plug 'mkitt/tabline.vim'
- Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
- Plug 'junegunn/fzf.vim'
- Plug 'dense-analysis/ale'
- Plug 'neoclide/coc.nvim', {'branch': 'release'}
- Plug 'vim-airline/vim-airline'
- Plug 'vim-airline/vim-airline-themes'
- Plug 'ctrlpvim/ctrlp.vim'
- Plug 'majutsushi/tagbar'
- "}}}
- "Plugin options{{{
- "auto-pairs options{{{
- let g:AutoPairsMapCR=0
- "}}}
- "gutentags options{{{
- let g:gutentags_project_root=[]
- cal add(g:gutentags_project_root, 'tags')
- "}}}
- "ale options{{{
- let g:ale_cpp_ccls_init_options={
- \ 'cache': {
- \ 'directory': '/tmp/ccls/cache'
- \ }
- \ }
- let g:ale_c_parse_compile_commands=1
- let g:ale_linters={
- \ 'cpp': ['ccls', 'clangtidy']
- \}
- "}}}
- "coc.nvim options{{{
- 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
- inoremap <silent><expr> <c-space> coc#refresh()
- inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
- 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)
- 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)
- "}}}
- "airline options{{{
- let g:airline#extensions#tabline#enabled=1
- let g:airline#extensions#tabline#formatter='unique_tail_improved'
- let g:airline_powerline_fonts=1
- let g:airline_left_sep=''
- let g:airline_left_alt_sep=''
- let g:airline_right_sep=''
- let g:airline_right_alt_sep=''
- "}}}
- "ctrlpvim options{{{
- let g:ctrlp_map='<c-p>'
- "}}}
- "}}}
- call plug#end()
- colorscheme base16-default-dark
- let g:airline_theme='base16_default'
- "Extra theme customization{{{
- hi! clear SignColumn
- hi! LineNr guibg=NONE
- hi! StatusLine guibg=#1F1F1F guifg=#909090
- hi! Folded guibg=Normal
- "}}}
- " vim: fdm=marker: fdl=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement