Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- call plug#begin('~/.vim/plugged')
- " General editting goodies
- Plug 'bling/vim-airline'
- Plug 'junegunn/fzf'
- Plug 'luochen1990/rainbow'
- Plug 'bronson/vim-trailing-whitespace'
- Plug 'junegunn/vim-peekaboo'
- Plug 'tpope/vim-surround'
- Plug 'w0rp/ale'
- Plug 'mileszs/ack.vim'
- " Completion
- Plug 'ncm2/ncm2'
- Plug 'roxma/nvim-yarp'
- Plug 'ncm2/ncm2-bufword'
- Plug 'ncm2/ncm2-path'
- " Git
- Plug 'tpope/vim-fugitive'
- Plug 'airblade/vim-gitgutter'
- " Haskell
- Plug 'neovimhaskell/haskell-vim', { 'for': 'haskell' }
- " TypeScript
- Plug 'HerringtonDarkholme/yats.vim'
- Plug 'mhartington/nvim-typescript', {'do': './install.sh'}
- " Elm
- Plug 'elmcast/elm-vim', { 'for': 'elm' }
- " Colors
- Plug 'lifepillar/vim-solarized8'
- " Initialize plugin system
- call plug#end()
- " Color setup
- if (has("termguicolors"))
- set termguicolors
- endif
- set background=dark
- colorscheme solarized8
- let g:gitgutter_enabled = 1
- " Generic editting config
- set number
- set incsearch
- set smartindent
- set ignorecase
- set smartcase
- set cursorline
- set nowrap " wrap long lines
- set autoindent " indent at the same level of the previous line
- set shiftwidth=2 " use indents of 4 spaces
- set tabstop=2
- set softtabstop=2
- set smarttab
- set matchpairs+=<:> " match, to be used with %
- set expandtab
- nnoremap <silent> <Leader>d :close<cr>
- " neovimhaskell/haskell-vim config
- let g:haskell_enable_quantification = 1 " to enable highlighting of `forall`
- let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec`
- let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc`
- let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern`
- let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles
- let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static`
- let g:haskell_backpack = 1 " to enable highlighting of backpack keywords
- " luochen1990/rainbow config
- let g:rainbow_active = 1
- " FZF {{{
- " <C-p> or <C-t> to search files
- nnoremap <silent> <C-t> :FZF -m<cr>
- nnoremap <silent> <C-p> :FZF -m<cr>
- " Elm
- let g:elm_format_autosave = 0
- let g:elm_format_fail_silently = 0
- " Ack
- if executable('ag')
- let g:ackprg = 'ag --vimgrep'
- endif
- cnoreabbrev Ack Ack!
- nnoremap <Leader>a :Ack!<Space>
- " ALE
- let g:ale_linters = {'haskell': ['hie', 'hlint', 'stack_build']}
- let g:ale_haskell_hie_executable = 'hie-wrapper'
- nnoremap <silent> <Leader>g :ALEGoToDefinition<cr>
- nnoremap <silent> <Leader>t :ALEHover<cr>
- nnoremap <silent> <Leader>m :ALEDetail<cr>
- nnoremap <silent> <Leader>r :ALEFindReferences<cr>
- " bronson/vim-trailing-whitespace
- nnoremap <silent> <Leader><space> :FixWhitespace<cr>
- " Completion
- autocmd BufEnter * call ncm2#enable_for_buffer()
- set completeopt=noinsert,menuone,noselect
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement