2015-12-29 20:00:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
" General Options {{{
|
|
|
|
" =====================
|
|
|
|
let mapleader=';'
|
|
|
|
|
|
|
|
syntax enable
|
|
|
|
|
2016-05-09 23:00:17 +02:00
|
|
|
set mouse= " fuck you, mouse
|
2015-12-29 20:00:48 +01:00
|
|
|
set number " line numbers on the right side
|
|
|
|
set showcmd " show the commands while typing
|
|
|
|
set splitright " open new splits on the right
|
|
|
|
set splitbelow " open new splits below
|
|
|
|
set autoread " autoreload file on change
|
|
|
|
set scrolloff=8 " keep the cursor 8 lines away from the top/bottom
|
|
|
|
set ruler " show the lines/% bottomright
|
|
|
|
"set encoding=utf-8 " set default encoding
|
|
|
|
set laststatus=2 " always show the status line
|
|
|
|
|
|
|
|
" wrap lines at 72 characters
|
|
|
|
"set formatprg=par\ -w72
|
|
|
|
set formatoptions=tcrqnlmj
|
|
|
|
set textwidth=72
|
|
|
|
|
|
|
|
" indentation
|
|
|
|
set tabstop=4 " tab is 4 width
|
|
|
|
set shiftwidth=4 " for use with > and <
|
|
|
|
set expandtab " tab key puts spaces
|
|
|
|
set list " show whitespace, configure below
|
|
|
|
set listchars=tab:·\ ,trail:·
|
|
|
|
" display tabs with a leading \cdot
|
|
|
|
" trailing whitespace looks like \cdot
|
|
|
|
|
2015-12-29 22:09:27 +01:00
|
|
|
" Movement keys
|
|
|
|
nnoremap <Up> <NOP>
|
|
|
|
nnoremap <Down> <NOP>
|
|
|
|
nnoremap <Left> <NOP>
|
|
|
|
nnoremap <Right> <NOP>
|
|
|
|
|
|
|
|
" Not too much folding
|
2016-10-14 14:09:48 +02:00
|
|
|
set foldlevelstart=3
|
2015-12-29 22:09:27 +01:00
|
|
|
|
|
|
|
" Hmmmm neovim terminals
|
|
|
|
tnoremap <Esc> <C-\><C-n>
|
|
|
|
|
2015-12-30 01:23:08 +01:00
|
|
|
" Quickfixing
|
2016-10-21 13:07:39 +02:00
|
|
|
nnoremap <Leader>d :split<CR>
|
2015-12-30 01:23:08 +01:00
|
|
|
nnoremap <Leader>co :copen<CR>
|
|
|
|
nnoremap <Leader>cn :cnext<CR>
|
|
|
|
nnoremap <Leader>cp :cprevious<CR>
|
|
|
|
|
2015-12-29 20:00:48 +01:00
|
|
|
" General Options }}}
|
|
|
|
|
|
|
|
" Plugins {{{
|
|
|
|
" =====================
|
|
|
|
|
|
|
|
" Plugged
|
|
|
|
" -------
|
|
|
|
call plug#begin('~/.config/nvim/plugged')
|
2017-02-13 18:11:30 +01:00
|
|
|
" Layout
|
2015-12-29 20:00:48 +01:00
|
|
|
Plug 'bling/vim-airline'
|
2016-04-29 10:18:09 +02:00
|
|
|
Plug 'junegunn/vim-peekaboo'
|
2017-02-13 18:11:30 +01:00
|
|
|
" Files
|
|
|
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
|
|
|
Plug 'junegunn/fzf.vim', { 'on': ['Rg', 'Files', 'Tags'] }
|
|
|
|
" Movement
|
|
|
|
Plug 'easymotion/vim-easymotion'
|
|
|
|
Plug 'haya14busa/incsearch.vim'
|
2016-06-12 12:08:37 +02:00
|
|
|
Plug 'ludovicchabant/vim-gutentags'
|
2016-06-12 12:46:35 +02:00
|
|
|
Plug 'majutsushi/tagbar'
|
2017-02-13 18:11:30 +01:00
|
|
|
" Integration
|
|
|
|
Plug 'tpope/vim-fugitive', { 'on': ['Gdiff', 'Gstatus', 'Gcommit', 'Gblame'] }
|
|
|
|
Plug 'kassio/neoterm', { 'on': 'T' }
|
|
|
|
" Formatting
|
|
|
|
Plug 'junegunn/vim-easy-align', { 'on': 'EasyAlign' }
|
|
|
|
" Languages
|
|
|
|
Plug 'LaTeX-Box-Team/LaTeX-Box', { 'for': 'tex' }
|
|
|
|
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
|
2016-12-20 14:17:05 +01:00
|
|
|
Plug 'neovimhaskell/haskell-vim', { 'for': 'haskell' }
|
2017-02-13 18:11:30 +01:00
|
|
|
" Completion
|
|
|
|
Plug 'Valloric/YouCompleteMe'
|
2015-12-29 20:00:48 +01:00
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
" Plugin configuration
|
|
|
|
" --------------------
|
|
|
|
let g:airline_powerline_fonts=1
|
|
|
|
|
|
|
|
nnoremap <Leader>t :NERDTreeToggle<CR><CR>
|
|
|
|
let NERDTreeIgnore=[
|
|
|
|
\ ".*\\.class$",
|
|
|
|
\ ".*\\.o$",
|
|
|
|
\ ".*\\.hi$",
|
|
|
|
\ ".*\\.pyc$"
|
|
|
|
\ ]
|
|
|
|
|
2017-02-13 18:11:30 +01:00
|
|
|
xnoremap <Leader>a :EasyAlign<CR>
|
|
|
|
nmap <Leader>a :EasyAlign<CR>
|
2015-12-29 20:00:48 +01:00
|
|
|
|
|
|
|
let g:EasyMotion_do_mapping=0
|
2016-02-25 10:02:43 +01:00
|
|
|
let g:EasyMotion_startofline=0
|
2016-01-20 19:31:08 +01:00
|
|
|
map <Leader>f <Plug>(easymotion-s)
|
|
|
|
map <Leader>j <Plug>(easymotion-j)
|
|
|
|
map <Leader>k <Plug>(easymotion-k)
|
2016-10-21 13:07:39 +02:00
|
|
|
map <Leader>w <Plug>(easymotion-bd-w)
|
2016-02-25 10:02:43 +01:00
|
|
|
nmap <Leader>w <Plug>(easymotion-overwin-w)
|
2015-12-29 20:00:48 +01:00
|
|
|
|
2015-12-30 01:23:08 +01:00
|
|
|
let g:ycm_global_ycm_extra_conf='~/.config/nvim/ycm_extra_conf.py'
|
2016-03-25 09:52:33 +01:00
|
|
|
let g:ycm_rust_src_path='/data/programming/rustc-1.7.0/src'
|
2016-01-20 19:31:08 +01:00
|
|
|
set completeopt=menu
|
2015-12-29 20:00:48 +01:00
|
|
|
|
2016-06-12 18:58:32 +02:00
|
|
|
let g:gutentags_cache_dir = '~/.cache/gutentag'
|
|
|
|
|
2016-06-12 12:46:35 +02:00
|
|
|
nnoremap <Leader>o :Tagbar<CR>
|
|
|
|
let g:tagbar_autoclose=1
|
|
|
|
let g:tagbar_autofocus=1
|
|
|
|
let g:tagbar_sort=0
|
|
|
|
let g:tagbar_compact=1
|
|
|
|
let g:tagbar_iconchars=['▸', '▾']
|
|
|
|
let g:tagbar_type_make={
|
|
|
|
\ 'kinds': ['m:macros', 't:targets']
|
|
|
|
\ }
|
|
|
|
let g:tagbar_type_rust={
|
|
|
|
\ 'ctagstype': 'rust',
|
|
|
|
\ 'kinds': [
|
|
|
|
\ 'n:modules',
|
|
|
|
\ 's:structs',
|
|
|
|
\ 'i:interfaces',
|
|
|
|
\ 'c:implementations',
|
|
|
|
\ 'f:functions',
|
|
|
|
\ 'g:enums',
|
|
|
|
\ 't:typedefs',
|
|
|
|
\ 'v:variables',
|
|
|
|
\ 'M:macros',
|
|
|
|
\ 'm:fields',
|
|
|
|
\ 'e:enumerators',
|
|
|
|
\ 'F:methods',
|
|
|
|
\ ]
|
|
|
|
\ }
|
|
|
|
|
2015-12-30 19:14:21 +01:00
|
|
|
let g:haskell_enable_quantification=1
|
|
|
|
let g:haskell_enable_recursivedo=1
|
|
|
|
let g:haskell_enable_arrowsyntax=1
|
|
|
|
let g:haskell_enable_pattern_synonyms=1
|
|
|
|
let g:haskell_enable_typeroles=1
|
|
|
|
let g:haskell_enable_static_pointers=1
|
2016-10-21 13:07:39 +02:00
|
|
|
|
|
|
|
map / <Plug>(incsearch-forward)
|
|
|
|
map ? <Plug>(incsearch-backward)
|
|
|
|
map g/ <Plug>(incsearch-stay)
|
|
|
|
set hlsearch
|
|
|
|
let g:incsearch#auto_nohlsearch = 1
|
|
|
|
map n <Plug>(incsearch-nohl-n)
|
|
|
|
map N <Plug>(incsearch-nohl-N)
|
|
|
|
map * <Plug>(incsearch-nohl-*)
|
|
|
|
map # <Plug>(incsearch-nohl-#)
|
|
|
|
map g* <Plug>(incsearch-nohl-g*)
|
|
|
|
map g# <Plug>(incsearch-nohl-g#)
|
2016-12-20 14:17:05 +01:00
|
|
|
|
|
|
|
" path for fzf install
|
|
|
|
set rtp+=/usr/share/vim/vimfiles/
|
|
|
|
command! -bang -nargs=* Rg
|
|
|
|
\ call fzf#vim#grep(
|
|
|
|
\ 'rg --follow --column --line-number --no-heading --color=always '.shellescape(<q-args>), 0,
|
|
|
|
\ <bang>0)
|
|
|
|
nnoremap <Leader>g :Rg<CR>
|
|
|
|
nnoremap <Leader>l :Files<CR>
|
|
|
|
nnoremap <Leader>s :Tags<CR>
|
|
|
|
" Plugged }}}
|
2015-12-29 20:00:48 +01:00
|
|
|
|
|
|
|
" vim: foldmethod=marker
|