1- " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
1+ " """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
22" Plugins
3- " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
3+ " """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
44" This uses the `vim-plug` manager:
55" https://github.com/junegunn/vim-plug
66"
@@ -26,6 +26,12 @@ Plug 'junegunn/fzf', {
2626Plug ' junegunn/fzf.vim'
2727" Multiple cursor edit. Select word, use <C-n> then c or something.
2828Plug ' terryma/vim-multiple-cursors'
29+ " Which-key
30+ Plug ' liuchengxu/vim-which-key'
31+ " Buffer delete
32+ Plug ' moll/vim-bbye'
33+ " Highlight yanked text for a bit
34+ Plug ' machakann/vim-highlightedyank'
2935
3036" "" Generic coding helpers
3137" gc / gcc for commenting stuff
@@ -38,13 +44,15 @@ Plug 'tpope/vim-surround'
3844Plug ' luochen1990/rainbow'
3945" Indentation guides
4046Plug ' nathanaelkane/vim-indent-guides'
47+ " %S stuff
48+ Plug ' tpope/vim-abolish'
4149
4250" "" Git
4351" Basic git plugin, g? for help in gstatus
4452Plug ' tpope/vim-fugitive'
4553" Additional plugin for github (pretty much for :Gbrowse I think)
4654Plug ' tpope/vim-rhubarb'
47- " Git gutter, must read more
55+ " Git gutter, must read more
4856Plug ' airblade/vim-gitgutter'
4957" Try out: https://github.com/jreybert/vimagit
5058
@@ -56,14 +64,14 @@ Plug 'tpope/vim-markdown'
5664
5765" "" Haskell
5866" Indentation and syntax highlighting
59- Plug ' neovimhaskell /haskell-vim'
67+ Plug ' vladciobanu /haskell-vim'
6068Plug ' nbouscal/vim-stylish-haskell'
6169" <C-y> to insert function above, [[ and ]] to navigate
6270Plug ' edkolev/curry.vim'
6371" Plug 'enomsg/vim-haskellConcealPlus'
6472
6573" "" PureScript
66- " Plug 'purescript-contrib/purescript-vim'
74+ Plug ' purescript-contrib/purescript-vim'
6775" Plug 'FrigoEU/psc-ide-vim'
6876
6977" "" Rust
@@ -85,16 +93,31 @@ Plug 'vim-syntastic/syntastic'
8593" "" Agda
8694Plug ' derekelkins/agda-vim'
8795
96+ " "" Dhall
97+ Plug ' vmchale/dhall-vim'
98+
8899" "" Colorschemes
89100Plug ' fatih/molokai'
90101Plug ' lifepillar/vim-solarized8'
91102
103+ " "" Testing
104+ Plug ' xuyuanp/nerdtree-git-plugin'
105+ Plug ' mbbill/undotree'
106+ Plug ' kshenoy/vim-signature'
107+ Plug ' plasticboy/vim-markdown'
108+ Plug ' bronson/vim-trailing-whitespace'
109+ Plug ' vimwiki/vimwiki'
110+
111+ Plug ' justinmk/vim-sneak'
92112" Initialize plugin system
93113call plug#end ()
94114
95115" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
96116" Generic vim setup
97117" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
118+ " vimwiki
119+ set nocompatible
120+
98121" Leader setup
99122let mapleader = ' '
100123let maplocalleader = ' ,'
@@ -120,7 +143,7 @@ set incsearch
120143set hlsearch
121144set smartcase
122145" Not sure what these are
123- au InsertEnter * set nocursorline
146+ " au InsertEnter * set nocursorline
124147au InsertLeave * set cursorline
125148set cursorline
126149set cursorcolumn
@@ -129,6 +152,12 @@ set ruler
129152set scrolloff = 3
130153" Disable folding, what does this do?
131154set nofoldenable
155+ " Basic setup for text files
156+ " autocmd FileType md setlocal textwidth=80 spell
157+ " autocmd FileType txt setlocal textwidth=80 spell
158+ " autocmd FileType tex setlocal textwidth=80 spell
159+ " Show substitutions as you type them
160+ set inccommand= nosplit
132161
133162" "" Plugin-specific
134163" for vim-devicons
@@ -158,6 +187,15 @@ let g:haskell_conceal = 0
158187let g: haskell_conceal_wide = 0
159188let g: haskell_coneal_enumerations = 0
160189let g: haskell_hsp = 0
190+ " haskell-vim
191+ let g: haskell_indent_if = 4
192+ let g: haskell_indent_case = 4
193+ let g: haskell_indent_let = 4
194+ let g: haskell_indent_where = 2
195+ let g_haskell_indent_before_where = 2
196+ let g_haskell_indent_after_bare_where = 2
197+ let g_haskell_indent_do = 4
198+ let g_haskell_indent_in = 2
161199
162200" Idris
163201let g: idris_conceal = 1
@@ -166,40 +204,41 @@ let g:idris_conceal = 1
166204" TODO: there's a bug with 'S'
167205let hscoptions= " STEMsrl↱w-tBQZNDC"
168206
169- " CoC setup
170- let g: LanguageClient_rootMarkers = [' *.cabal' , ' stack.yaml' ]
171- let g: LanguageClient_serverCommands = {
172- \ ' haskell' : [' ghcide' , ' --lsp' ],
173- \ }
207+ " coc.nvim
208+ set hidden
209+ set nobackup
210+ set nowritebackup
211+ set shortmess += c
212+ set signcolumn = yes
174213
175214" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
176215" Keyboard customization
177216" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
217+ " Which-key
218+ nnoremap <silent> <leader> :<c-u> WhichKeyVisual '<Space> '<CR>
219+ nnoremap <silent> <localleader> :<c-u> WhichKeyVisual ','<CR>
220+
178221" Light/dark theme
179222map <Leader> cl :set background=light<cr> :colorscheme solarized8<cr>
180223map <Leader> cd :set background=dark<cr> :colorscheme molokai<cr>
181224
182225" NERDTree
183226map <Leader> nt :NERDTreeToggle<CR>
184227
228+ map <Leader> ar :Tabularize /
229+
185230" fzf - find - f
186- map <Leader> <Space> :Files <CR>
231+ map <Leader> <Space> :call fzf#run(fzf#wrap({'source': 'git ls-files --exclude-standard --others --cached'})) <CR>
187232map <Leader> fg :GFiles?<CR>
188233map <Leader> fb :Buffers<CR>
234+ map <Leader> cr :Rg<CR>
189235map <Leader> bb :Buffers<CR>
190236map <Leader> ft :tag <C-r><C-w><CR>
191237map <Leader> fc :Commits<CR>
192238
193239" window - w
194- map <Leader> ws :vsplit<CR>
195- map <Leader> we :split<CR>
196-
197- map <Leader> ww <C-w><C-w>
198-
199- map <Leader> wl <C-w><C-l>
200- map <Leader> wh <C-w><C-h>
201- map <Leader> wj <C-w><C-j>
202- map <Leader> wk <C-w><C-k>
240+ map <Leader> ss :vsplit<CR>
241+ map <Leader> se :split<CR>
203242
204243map <Leader> wr <C-w> r
205244
@@ -210,11 +249,12 @@ map <Leader>th :split<CR>:term<CR>
210249tnoremap <Esc> <C-\><C-n>
211250
212251" buffer - b
213- map <Leader> bd :bd <Cr>
252+ map <Leader> bd :Bd <Cr>
214253
215254" git stuff - g
216255map <Leader> gg :Gstatus<CR>
217256map <Leader> gs :Gstatus<CR>
257+ map <Leader> gp :Gpush<CR>
218258map <Leader> gd :Gvdiff<CR>
219259map <Leader> gsd :Gdivv<CR>
220260map <Leader> dh :diffget //2<CR> :diffupdate<CR>
@@ -249,8 +289,6 @@ nmap <silent> gy <Plug>(coc-type-definition)
249289nmap <silent> gi <Plug> (coc-implementation)
250290nmap <silent> gr <Plug> (coc-references)
251291
252-
253-
254292" Use K to show documentation in preview window
255293nnoremap <silent> K :call <SID> show_documentation()<CR>
256294
@@ -265,15 +303,14 @@ endfunction
265303" Highlight symbol under cursor on CursorHold ?? this doesnt seem to work
266304autocmd CursorHold * silent call CocActionAsync (' highlight' )
267305
268- " Remap for rename current word -- doesn't seem to work yet
306+ " Remap for rename current word
269307nmap <leader> rn <Plug> (coc-rename)
270308
271- " Remap for do codeAction of selected region, ex: `<leader> aap` for current paragraph
272- xmap <leader> a <Plug> (coc-codeaction-selected)
273- nmap <leader> a <Plug> (coc-codeaction-selected)
274-
275309" Remap for do codeAction of current line
276310nmap <leader> ac <Plug> (coc-codeaction)
277311" Fix autofix problem of current line
278312nmap <leader> qf <Plug> (coc-fix-current)
279313
314+ " "" Under test
315+ nnoremap <leader> ut :UndotreeToggle<cr>
316+
0 commit comments