~pvsr/dotfiles

ref: 9f079cc00c6f69364d56e45d8d8a7abc3ee419f2 dotfiles/nvim/.config/nvim/plugins.toml -rw-r--r-- 4.0 KiB
9f079cc0Peter Rice denite bindings 1 year, 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# TODO more plugins can be lazily loaded

# core plugins

[[plugins]]
repo = "haya14busa/dein-command.vim"

# linting
[[plugins]]
repo = "neomake/neomake"
on_cmd = "Neomake"
hook_post_source = """
  call neomake#configure#automake('rw', 400)
  let g:neomake_python_enabled_makers = ['python', 'pylint', 'mypy']

  let g:neomake_cabal_args = ['new-build']
"""

[[plugins]]
repo = "Shougo/denite.nvim"
on_cmd = "Denite"
# TODO expand on these mappings
hook_add = """
autocmd FileType denite call s:denite_my_settings()
function! s:denite_my_settings() abort
  nnoremap <silent><buffer><expr> <CR>
  \ denite#do_map('do_action')
  nnoremap <silent><buffer><expr> d
  \ denite#do_map('do_action', 'delete')
  nnoremap <silent><buffer><expr> p
  \ denite#do_map('do_action', 'preview')
  nnoremap <silent><buffer><expr> q
  \ denite#do_map('quit')
  nnoremap <silent><buffer><expr> i
  \ denite#do_map('open_filter_buffer')
  nnoremap <silent><buffer><expr> J
  \ denite#do_map('toggle_select').'j'
  nnoremap <silent><buffer><expr> K
  \ denite#do_map('toggle_select').'k'
endfunction

nnoremap <leader>* :Denite grep:::\\b<c-r><c-w>\\b<cr>
nnoremap <leader>fr :Denite file/rec<cr>
nnoremap <leader>b :Denite buffer<cr>
"""
hook_post_source = """
call denite#custom#var('file/rec', 'command',
  \ ['fd', '-H', '-t', 'f', '-E', '.git', '.'])

call denite#custom#var('grep', 'command', ['rg'])
call denite#custom#var('grep', 'default_opts',
  \ ['-i', '--vimgrep', '--no-heading'])
call denite#custom#var('grep', 'recursive_opts', [])
call denite#custom#var('grep', 'pattern_opt', ['--regexp'])
call denite#custom#var('grep', 'separator', ['--'])
call denite#custom#var('grep', 'final_opts', [])
"""

# aesthetics

[[plugins]]
repo = "srcery-colors/srcery-vim"
# TODO this fails on first load
hook_add = """
  colorscheme srcery
"""

[[plugins]]
repo = "vim-airline/vim-airline"
hook_add = """
  set noshowmode
"""

# language support

[[plugins]]
repo = "cespare/vim-toml"

[[plugins]]
repo = "neovimhaskell/haskell-vim"

[[plugins]]
repo = "dag/vim-fish"

# completion

[[plugins]]
repo = "Shougo/deoplete.nvim"
#on_event = "InsertEnter"
hook_add = """
  call deoplete#custom#option('auto_complete_delay', 300)
  let g:deoplete#enable_at_startup = 1
  let g:deoplete#max_menu_width = 60
  inoremap <expr><C-h>
  \ deoplete#smart_close_popup()."\<C-h>"
  inoremap <expr><BS>
  \ deoplete#smart_close_popup()."\<C-h>"
"""

[[plugins]]
repo = "Shougo/echodoc.vim"
hook_add = """
  let g:echodoc#enable_at_startup = 1
  set completeopt-=preview
"""

[[plugins]]
repo = "Shougo/neopairs.vim"
hook_add = """
  let g:neopairs#enable = 1
  " TODO technically this should add to the converters rather than replace
  call g:deoplete#custom#source('_', 'converters', ['converter_auto_paren'])
"""

[[plugins]]
repo = "Shougo/neosnippet.vim"
depends = "neosnippet-snippets"
# TODO i_<C-k> is digraphs, maybe find better keybinding
hook_add = """
  imap <C-k> <Plug>(neosnippet_expand_or_jump)
  smap <C-k> <Plug>(neosnippet_expand_or_jump)
  xmap <C-k> <Plug>(neosnippet_expand_target)
"""
# TODO useful?
#  smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
#              \ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"

[[plugins]]
repo = "Shougo/neosnippet-snippets"

[[plugins]]
repo = "eagletmt/neco-ghc"
on_ft = "hs"
hook_post_source = """
  let g:haskellmode_completion_ghc = 0
  let g:necoghc_enable_detailed_browse = 1
"""

[[plugins]]
repo = "zchee/deoplete-jedi"

# passive improvements

[[plugins]]
repo = "tpope/vim-repeat"

# indent detection
[[plugins]]
repo = "tpope/vim-sleuth"

[[plugins]]
repo = "vim-scripts/argtextobj.vim"

# new commands

# :Abolish for typos, :Subvert for advanced :s, case coercion bindings
[[plugins]]
repo = "tpope/vim-abolish"
# TODO e.g. :Abolish {despa,sepe}rat{e,es,ed,ing,ely,ion,ions,or}  {despe,sepa}rat{}

# cx, v_X -- exchange, cxc -- clear
[[plugins]]
repo = "tommcdo/vim-exchange"

# gc, :Commentary -- comment
[[plugins]]
repo = "tpope/vim-commentary"

[[plugins]]
repo = "tpope/vim-surround"

[[plugins]]
repo = "tpope/vim-unimpaired"