36 Plug 'lifepillar/vim-mucomplete' |
36 Plug 'lifepillar/vim-mucomplete' |
37 Plug 'tpope/vim-endwise' |
37 Plug 'tpope/vim-endwise' |
38 Plug 'kana/vim-textobj-user' |
38 Plug 'kana/vim-textobj-user' |
39 Plug 'glts/vim-textobj-comment' |
39 Plug 'glts/vim-textobj-comment' |
40 |
40 |
41 Plug 'prabirshrestha/vim-lsp' |
|
42 Plug 'mattn/vim-lsp-settings' |
|
43 |
|
44 Plug 'vimwiki/vimwiki' |
41 Plug 'vimwiki/vimwiki' |
45 |
42 |
46 Plug 'Shougo/vinarise.vim' |
43 Plug 'Shougo/vinarise.vim' |
47 Plug 'asciidoc/vim-asciidoc' |
44 Plug 'asciidoc/vim-asciidoc' |
48 Plug 'vim-perl/vim-perl', {'branch': 'dev'} |
45 Plug 'vim-perl/vim-perl', {'branch': 'dev'} |
120 noremap <leader>te :Tabularize first_eq<CR> |
117 noremap <leader>te :Tabularize first_eq<CR> |
121 noremap <leader>tc :Tabularize first_colon<CR> |
118 noremap <leader>tc :Tabularize first_colon<CR> |
122 noremap <leader>tm :Tabularize methods<CR> |
119 noremap <leader>tm :Tabularize methods<CR> |
123 |
120 |
124 noremap <silent> <leader>a :call vimrc#AutoFmtToggle()<CR> |
121 noremap <silent> <leader>a :call vimrc#AutoFmtToggle()<CR> |
125 |
|
126 " Maps that only apply when an LSP is available |
|
127 func! s:on_lsp_buffer_enabled() abort |
|
128 setl omnifunc=lsp#complete |
|
129 if exists('+tagfunc') |
|
130 setl tagfunc=lsp#tagfunc |
|
131 endif |
|
132 nmap <buffer> K <plug>(lsp-hover) |
|
133 nmap <buffer> gd <plug>(lsp-definition) |
|
134 nmap <buffer> gr <plug>(lsp-references) |
|
135 nmap <buffer> gt <plug>(lsp-peek-type-definition) |
|
136 nmap <buffer> ]d <plug>(lsp-next-diagnostic) |
|
137 nmap <buffer> [d <plug>(lsp-previous-diagnostic) |
|
138 nmap <buffer> ]r <plug>(lsp-next-reference) |
|
139 nmap <buffer> [r <plug>(lsp-previous-reference) |
|
140 nmap <buffer> <leader>rn <plug>(lsp-rename) |
|
141 nmap <buffer> <leader>gt <plug>(lsp-type-definition) |
|
142 let &signcolumn = (has('gui_running') ? 'number' : 'yes') |
|
143 hi lspReference ctermfg=217 guifg=#f0a0c0 |
|
144 endfunc |
|
145 |
122 |
146 " Commands & Aliases {{{ |
123 " Commands & Aliases {{{ |
147 command! -nargs=+ CAlias call vimrc#CommandAlias(<f-args>) |
124 command! -nargs=+ CAlias call vimrc#CommandAlias(<f-args>) |
148 |
125 |
149 command! Gcd call vimrc#Gcd() |
126 command! Gcd call vimrc#Gcd() |
354 " enable and prefer local buffer before tags |
331 " enable and prefer local buffer before tags |
355 let g:mucomplete#completion_delay = 300 |
332 let g:mucomplete#completion_delay = 300 |
356 let g:mucomplete#chains = { |
333 let g:mucomplete#chains = { |
357 \ 'default': ['path', 'c-n', 'omni', 'tags', 'dict', 'uspl'], |
334 \ 'default': ['path', 'c-n', 'omni', 'tags', 'dict', 'uspl'], |
358 \} |
335 \} |
359 |
|
360 ">> vim-lsp |
|
361 let g:lsp_diagnostics_echo_cursor = 1 |
|
362 let g:lsp_diagnostics_echo_delay = 200 |
|
363 let g:lsp_diagnostics_highlight_enabled = 0 |
|
364 let g:lsp_diagnostics_signs_insert_mode_enabled = 0 |
|
365 let g:lsp_document_code_action_signs_enabled = 0 |
|
366 let g:lsp_preview_doubletap = [function('lsp#ui#vim#output#closepreview')] |
|
367 |
|
368 let g:lsp_settings_enable_suggestions = 0 |
|
369 let g:lsp_settings_deny_local_keys = ['cmd', 'config', 'disabled', 'workspace_config'] |
|
370 let g:lsp_settings_filetype_perl = v:false |
|
371 let g:lsp_settings_filetype_ruby = ['solargraph'] |
|
372 |
|
373 if !has('patch-8.1.1517') && !has('neovim') |
|
374 let g:lsp_signature_help_enabled = 0 |
|
375 endif |
|
376 |
|
377 augroup vim-lsp |
|
378 autocmd! |
|
379 autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() |
|
380 autocmd User lsp_float_opened call s:on_lsp_float_opened() |
|
381 autocmd FileType markdown.lsp-hover nmap <silent><buffer>q :pclose<CR> |
|
382 autocmd FileType markdown.lsp-hover exe "%s/](/]\r(/g" |
|
383 augroup END |
|
384 |
|
385 func! s:on_lsp_float_opened() abort |
|
386 call win_execute(popup_list()[0], 'setl sbr=NONE nobri linebreak') |
|
387 endfunc |
|
388 |
|
389 let g:lsp_settings = { |
|
390 \ 'gopls': { |
|
391 \ 'workspace_config': { 'gopls': { 'gofumpt': v:true } }, |
|
392 \ }, |
|
393 \ } |
|
394 |
336 |
395 ">> Vimwiki |
337 ">> Vimwiki |
396 let g:vimwiki_auto_chdir = 1 |
338 let g:vimwiki_auto_chdir = 1 |
397 let g:vimwiki_auto_header = 1 |
339 let g:vimwiki_auto_header = 1 |
398 let g:vimwiki_ext2syntax = {} |
340 let g:vimwiki_ext2syntax = {} |