SHARE
TWEET

Untitled

a guest Mar 18th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. call plug#begin('~/.vim/plugged')
  2.  
  3. " General editting goodies
  4. Plug 'bling/vim-airline'
  5. Plug 'junegunn/fzf'
  6. Plug 'luochen1990/rainbow'
  7. Plug 'bronson/vim-trailing-whitespace'
  8. Plug 'junegunn/vim-peekaboo'
  9. Plug 'tpope/vim-surround'
  10. Plug 'w0rp/ale'
  11. Plug 'mileszs/ack.vim'
  12.  
  13. " Completion
  14. Plug 'ncm2/ncm2'
  15. Plug 'roxma/nvim-yarp'
  16. Plug 'ncm2/ncm2-bufword'
  17. Plug 'ncm2/ncm2-path'
  18.  
  19. " Git
  20. Plug 'tpope/vim-fugitive'
  21. Plug 'airblade/vim-gitgutter'
  22.  
  23. " Haskell
  24. Plug 'neovimhaskell/haskell-vim', { 'for': 'haskell' }
  25.  
  26. " TypeScript
  27. Plug 'HerringtonDarkholme/yats.vim'
  28. Plug 'mhartington/nvim-typescript', {'do': './install.sh'}
  29.  
  30. " Elm
  31. Plug 'elmcast/elm-vim', { 'for': 'elm' }
  32.  
  33. " Colors
  34. Plug 'lifepillar/vim-solarized8'
  35.  
  36. " Initialize plugin system
  37. call plug#end()
  38.  
  39.  
  40. " Color setup
  41. if (has("termguicolors"))
  42.   set termguicolors
  43. endif
  44. set background=dark
  45. colorscheme solarized8
  46.  
  47. let g:gitgutter_enabled = 1
  48.  
  49. " Generic editting config
  50. set number
  51. set incsearch
  52. set smartindent
  53. set ignorecase
  54. set smartcase
  55. set cursorline
  56. set nowrap                       " wrap long lines
  57. set autoindent                 " indent at the same level of the previous line
  58. set shiftwidth=2               " use indents of 4 spaces
  59. set tabstop=2
  60. set softtabstop=2
  61. set smarttab
  62. set matchpairs+=<:>            " match, to be used with %
  63. set expandtab
  64. nnoremap <silent> <Leader>d :close<cr>
  65.  
  66. " neovimhaskell/haskell-vim config
  67. let g:haskell_enable_quantification = 1   " to enable highlighting of `forall`
  68. let g:haskell_enable_recursivedo = 1      " to enable highlighting of `mdo` and `rec`
  69. let g:haskell_enable_arrowsyntax = 1      " to enable highlighting of `proc`
  70. let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern`
  71. let g:haskell_enable_typeroles = 1        " to enable highlighting of type roles
  72. let g:haskell_enable_static_pointers = 1  " to enable highlighting of `static`
  73. let g:haskell_backpack = 1                " to enable highlighting of backpack keywords
  74.  
  75. " luochen1990/rainbow config
  76. let g:rainbow_active = 1
  77.  
  78. " FZF {{{
  79. " <C-p> or <C-t> to search files
  80. nnoremap <silent> <C-t> :FZF -m<cr>
  81. nnoremap <silent> <C-p> :FZF -m<cr>
  82.  
  83. " Elm
  84. let g:elm_format_autosave = 0
  85. let g:elm_format_fail_silently = 0
  86.  
  87. " Ack
  88. if executable('ag')
  89.   let g:ackprg = 'ag --vimgrep'
  90. endif
  91. cnoreabbrev Ack Ack!
  92. nnoremap <Leader>a :Ack!<Space>
  93.  
  94. " ALE
  95. let g:ale_linters = {'haskell': ['hie', 'hlint', 'stack_build']}
  96. let g:ale_haskell_hie_executable = 'hie-wrapper'
  97. nnoremap <silent> <Leader>g :ALEGoToDefinition<cr>
  98. nnoremap <silent> <Leader>t :ALEHover<cr>
  99. nnoremap <silent> <Leader>m :ALEDetail<cr>
  100. nnoremap <silent> <Leader>r :ALEFindReferences<cr>
  101.  
  102. " bronson/vim-trailing-whitespace
  103. nnoremap <silent> <Leader><space> :FixWhitespace<cr>
  104.  
  105. " Completion
  106. autocmd BufEnter * call ncm2#enable_for_buffer()
  107. set completeopt=noinsert,menuone,noselect
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top