dotfiles/.config/nvim/init.vim

61 lines
1020 B
VimL

"
" vim-plug
"
call plug#begin(stdpath('data') . '/plugged')
Plug 'ctrlpvim/ctrlp.vim'
" Code analysis and autocompletion
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Git
Plug 'airblade/vim-gitgutter'
" Undo tree
Plug 'mbbill/undotree'
call plug#end()
"
" General configuration
"
set title " Shows file name in title
set number " Shows line numbers
set nowrap " Do not wrap lines
set hidden " Allow buffer switch without saving
set ignorecase " Allows case insensitive searches
"set smartcase " Case sensitive searches if uppercase is used
set spelllang=en " Check language spelling in english
"
" Theming
"
colorscheme zellner
"
" CtrlP
"
map <C-S-P> <Esc>:CtrlPBuffer<CR>
"
" Deoplete
"
let g:deoplete#enable_at_startup = 1
" - Autocomplete with <Tab>
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
"
" UndoTree
"
map <C-S-u> <Esc>:UndotreeToggle<CR>
"
" Golang
"
" Auto imports on save/format
autocmd BufWritePre *.go :silent call CocAction('runCommand', 'editor.action.organizeImport')