-
Notifications
You must be signed in to change notification settings - Fork 0
/
vundle_plugins
505 lines (438 loc) · 14.8 KB
/
vundle_plugins
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
set nocompatible
filetype off
if isdirectory( '/opt/homebrew/opt' )
let s:brew = '/opt/homebrew'
else
let s:brew = '/usr/local'
endif
" YCM config
let g:ycm_seed_identifiers_with_syntax=0
let g:ycm_autoclose_preview_window_after_insertion=1
let g:ycm_confirm_extra_conf=0
let g:ycm_complete_in_comments=1
let g:ycm_complete_in_strings=1
let g:ycm_always_populate_location_list=1
let g:ycm_show_detailed_diag_in_popup=1
let g:ycm_update_diagnostics_in_insert_mode=1
let g:ycm_disable_tern=1
" Use a popup for the completion preview window if available
let g:ycm_add_preview_to_completeopt = 'popup'
try
set completepopup=height:10,width:60,highlight:PmenuSbar,border:off,align:menu
catch /.*/
endtry
let g:ycm_collect_identifiers_from_comments_and_strings=1
let g:ycm_collect_identifiers_from_tags_files=1
let g:ycm_java_jdtls_use_clean_workspace=0
if executable( s:brew . '/opt/java/bin/java' )
let g:ycm_java_binary_path = s:brew . '/opt/java/bin/java'
elseif executable( s:brew . '/opt/java11/bin/java' )
let g:ycm_java_binary_path = s:brew . '/opt/java11/bin/java'
elseif executable( '/usr/lib/jvm/java-1.17.0-openjdk-amd64/bin/java' )
let g:ycm_java_binary_path = '/usr/lib/jvm/java-1.17.0-openjdk-amd64/bin/java'
endif
let g:ycm_java_jdtls_workspace_root_path=$HOME . '/.ycmd/java/Workspace'
" let g:ycm_java_jdtls_repository_path = expand(
" \ '$HOME/repos/github/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository' )
"let g:ycm_server_log_level='debug'
let g:ycm_keep_logfiles=0
let g:ycm_auto_hover = ''
function! s:DefaultClangd()
let l:use_clangd_default = 1
let l:extra_conf = findfile( '.ycm_extra_conf.py', '.;' )
if !empty( l:extra_conf )
if filereadable( fnamemodify( l:extra_conf, ':p:h' ) . '/.ycm_no_clangd' )
let l:use_clangd_default = 0
endif
endif
let g:ycm_use_clangd=get( g:, 'ycm_use_clangd', l:use_clangd_default )
endfunction
call s:DefaultClangd()
" query-driver causes problems when used in combination with --gcc-toolchain:
" system include paths are added twice (and inconsistently); the solution for
" tbricks code is to just remove it as the gcc-toolchain flag adds enough actual
" paths
" \ '--query-driver=/**/*',
" \ '-log=verbose',
let g:ycm_clangd_args = get( g:, 'ycm_clangd_args', [] )
call extend( g:ycm_clangd_args, [
\ '-background-index',
\ '-completion-style=bundled',
\ '-pch-storage=memory',
\ '-header-insertion=iwyu',
\ '-j=4',
\ ] )
let g:ycm_enable_semantic_highlighting =
\ get( g:, 'ycm_enable_semantic_highlighting', 1 )
let g:ycm_enable_inlay_hints =
\ get( g:, 'ycm_enable_inlay_hints', 0 )
let g:ycm_echo_current_diagnostic = 'virtual-text'
let g:ycm_clear_inlay_hints_in_insert_mode = 1
" Ignore the error about comments not being allowed
let g:ycm_filter_diagnostics = {
\ "json": {
\ "regex": [ 'Comments.*\[521\]' ],
\ },
\ }
if g:ycm_use_clangd &&
\ !get( g:, 'ycm_clangd_clean', 0 ) &&
\ !has_key( g: , 'ycm_clangd_binary_path' )
if executable( expand( '$HOME/Development/llvm-project/build/bin/clangd' ) )
let g:ycm_clangd_binary_path =
\ expand( '$HOME/Development/llvm-project/build/bin/clangd' )
elseif executable( s:brew . '/opt/llvm/bin/clangd' )
let g:ycm_clangd_binary_path = s:brew . '/opt/llvm/bin/clangd'
endif
endif
" 'c,cpp,objc': [ 're!\w{3}', '_' ],
let g:ycm_semantic_triggers = {
\ 'vim' : [ '.', ':', '#' ],
\ 'c,cpp,objc': [ '_' ],
\ 'json': [ ' ' ],
\ 'VimspectorPrompt': [ '.', '->', ':', '<' ]
\ }
" Remove:
" \ 'markdown' : 1,
" \ 'vimwiki' : 1,
" \ 'text' : 1,
" \ 'pandoc' : 1,
let g:ycm_filetype_blacklist = {
\ 'tagbar' : 1,
\ 'qf' : 1,
\ 'notes' : 1,
\ 'unite' : 1,
\ 'infolog' : 1,
\ 'mail' : 1
\}
let s:lsp_dir = expand( '<sfile>:p:h' ) . '/bundle/lsp-examples'
if isdirectory( expand( '$HOME/Development/lsp' ) )
let s:lsp_dir = expand( '$HOME/Development/lsp' )
endif
" Python language servers
" let g:ycm_disable_jedi_completer = v:true
"
" these are all useless
" \ { 'name': 'msptvs',
" \ 'filetypes': [ 'python' ],
" \ 'cmdline': [ 'dotnet', s:lsp_dir . '/python/microsoft/python-language-server/output/bin/Debug/Microsoft.Python.LanguageServer.dll' ],
" \ },
" \ { 'name': 'palantirpython',
" \ 'filetypes': [ 'python' ],
" \ 'cmdline': [ s:lsp_dir . '/python/palantir/env/bin/pyls' ],
" \ },
"
" pyright - not bad
if isdirectory( s:lsp_dir )
let g:ycm_language_server = [
\ {
\ 'name': 'php',
\ 'cmdline': [ 'php', s:lsp_dir . '/php/vendor/bin/php-language-server.php' ],
\ 'filetypes': [ 'php' ],
\ },
\ {
\ 'name': 'json',
\ 'cmdline': [ 'node', s:lsp_dir . '/json/node_modules/.bin/vscode-json-languageserver', '--stdio' ],
\ 'filetypes': [ 'json' ],
\ 'capabilities': { 'textDocument': { 'completion': { 'completionItem': { 'snippetSupport': v:true } } } },
\ },
\ {
\ 'name': 'ruby',
\ 'cmdline': [ s:lsp_dir . '/ruby/bin/solargraph', 'stdio' ],
\ 'filetypes': [ 'ruby' ],
\ },
\ { 'name': 'd',
\ 'filetypes': [ 'd' ],
\ 'cmdline': [ s:lsp_dir . '/d/serve-d' ],
\ },
\ { 'name': 'docker',
\ 'filetypes': [ 'dockerfile' ],
\ 'cmdline': [ s:lsp_dir . '/docker/node_modules/.bin/docker-langserver', '--stdio' ]
\ },
\ { 'name': 'groovy',
\ 'filetypes': [ 'groovy' ],
\ 'cmdline': [ 'java', '-jar', s:lsp_dir . '/groovy/groovy-language-server/build/libs/groovy-language-server-all.jar' ]
\ },
\ { 'name': 'vim',
\ 'filetypes': [ 'vim' ],
\ 'cmdline': [ s:lsp_dir . '/viml/node_modules/.bin/vim-language-server', '--stdio' ],
\ 'capabilities': { 'textDocument': { 'completion': { 'completionItem': { 'snippetSupport': v:false } } } },
\ },
\ { 'name': 'gdscript',
\ 'filetypes': [ 'gdscript' ],
\ 'port': 6008,
\ },
\ {
\ 'name': 'cmake',
\ 'cmdline': [ expand( s:lsp_dir . '/cmake/venv/bin/cmake-language-server' )],
\ 'filetypes': [ 'cmake' ],
\ },
\ ]
function! Source(file) abort
if filereadable(a:file)
execute 'source' a:file
endif
endfunction
let g:ycm_lsp_dir = s:lsp_dir
call Source(s:lsp_dir . '/volar/snippet.vim')
call Source(s:lsp_dir . '/haskell/snippet.vim')
call Source(s:lsp_dir . '/dart/snippet.vim')
call Source(s:lsp_dir . '/jai/snippet.vim')
call Source(s:lsp_dir . '/lua/snippet.vim')
call Source(s:lsp_dir . '/matlab/snippet.vim')
call Source(s:lsp_dir . '/kotlin/snippet.vim')
endif
" let g:ycm_language_server += [
" \ {
" \ 'name': 'python',
" \ 'cmdline': [ 'node', s:lsp_dir . '/python/node_modules/.bin/pyright-langserver', '--stdio' ],
" \ 'filetypes': [ 'python' ],
" \ },
" \ ]
let g:ycm_language_server += [
\ {
\ 'name': 'tcl-parse-test',
\ 'cmdline': [
\ '/Users/ben/Development/tcl/tcl-parse-test/debug-Darwin-arm64/bin/server'
\ ],
\ 'filetypes': [ 'tcl' ],
\ }
\ ]
let g:ycm_language_server += [
\ {
\ 'name': 'yaml',
\ 'cmdline': [ 'node', expand( s:lsp_dir . '/yaml/node_modules/.bin/yaml-language-server' ), '--stdio' ],
\ 'filetypes': [ 'yaml' ],
\ 'capabilities': {
\ 'workspace': { 'configuration': v:true },
\ 'textDocument': {
\ 'completion': {
\ 'completionItem': { 'snippetSupport': v:true },
\ }
\ }
\ },
\ },
\ ]
if get( g:, 'ycm_use_ccls', 0 )
let g:ycm_language_server += [
\ {
\ 'name': 'ccls',
\ 'cmdline': [ 'ccls' ],
\ 'filetypes': [ 'c', 'cpp', 'cuda', 'objc', 'objcpp' ],
\ 'project_root_files': [ '.ccls-root', 'compile_commands.json' ]
\ }
\ ]
endif
let g:snips_author='Ben Jackson ([email protected])'
let g:Verdin#cooperativemode = 1
let g:Verdin#fuzzymatch = 0
let g:Verdin#autocomplete = 0
let g:Verdin#autobraketinsert = 0
" vim-gitgutter config
if exists( '&signcolumn' )
set signcolumn=yes
endif
" taglist config
let g:Tlist_Use_Right_Window = 1
let g:Tlist_Inc_Winwidth = 0
let g:Tlist_WinWidth = 45
let g:Tlist_GainFocus_On_ToggleOpen = 0
let g:Tlist_Ctags_Cmd = 'ctags'
let g:Tlist_Show_One_File = 0
let g:Tlist_Sort_Type = 'name'
" UltiSnips triggering
let g:UltiSnipsExpandTrigger = '<C-j>'
let g:UltiSnipsJumpForwardTrigger = '<C-j>'
let g:UltiSnipsJumpBackwardTrigger = '<C-k>'
" syntastic config
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_aggregate_errors = 1
let g:syntastic_python_python_exec = 'python3'
let g:syntastic_mode_map = {
\ 'mode': 'active',
\ 'passive_filetypes': [ 'c', 'cpp', 'objc', 'java', 'ruby', 'php' ]
\ }
let g:syntastic_java_checkers = []
let g:EclimFileTypeValidate = 0
let g:syntastic_cpp_checkers = [ 'cppcheck' ]
" TODO: Do this in the ftplugin when you know if you need cargo or rustc
let g:syntastic_rust_checkers = [ 'cargo' ]
" neomake
let g:neomake_cpp_enabled_makers = []
let g:neomake_c_enabled_makers = []
let g:neomake_objc_enabled_makers = []
let g:neomake_java_enabled_makers = []
let g:neomake_vim_enabled_makers = []
let g:neomake_rust_enabled_makers = []
let g:neomake_python_python_exe = 'python3'
let g:neomake_vim_enabled_makers = []
if executable( 'vint' )
let g:neomake_vim_enabled_makers += [ 'vint' ]
endif
" windowswap mappings
let g:windowswap_map_keys = 0
nnoremap <silent> <leader>ww :call WindowSwap#EasyWindowSwap()<CR>
" vim-grep - use the silver searcher
let g:vimgrep_ag_command="ag --vimgrep --nogroup --column --hidden"
" vimspector
" let g:vimspector_enable_mappings = 'VISUAL_STUDIO'
let g:vimspector_enable_mappings = 'HUMAN'
let g:vimspector_test_args = '--basedir test-base'
let g:vimspector_install_gadgets = [ '--all', '--force-all' ]
let g:vimspector_adapters = #{
\ test_debugpy: #{ extends: 'debugpy' }
\ }
let g:vimspector_configurations = {
\ "test_debugpy_config": {
\ "adapter": "test_debugpy",
\ "filetypes": [ "python" ],
\ "configuration": {
\ "request": "launch",
\ "type": "python",
\ "cwd": "${fileDirname}",
\ "args": [],
\ "program": "${file}",
\ "stopOnEntry": v:false,
\ "console": "integratedTerminal",
\ "integer": 123,
\ },
\ "breakpoints": {
\ "exception": {
\ "raised": "N",
\ "uncaught": "",
\ "userUnhandled": ""
\ }
\ }
\ } }
" netrw
let g:netrw_keepj = ''
let g:markdown_fenced_languages = [
\ 'help',
\ 'c++=cpp',
\ 'bash=sh',
\ 'sh',
\ 'viml=vim',
\ 'json',
\ 'rust',
\ 'python',
\ ]
let g:markdown_syntax_conceal = 1
" fzf
" Required:
" - width [float range [0 ~ 1]]
" - height [float range [0 ~ 1]]
"
" Optional:
" - xoffset [float default 0.5 range [0 ~ 1]]
" - yoffset [float default 0.5 range [0 ~ 1]]
" - highlight [string default 'Comment']: Highlight group for border
" - border [string default 'rounded']: Border style
" - 'rounded' / 'sharp' / 'horizontal' / 'vertical' / 'top' / 'bottom' / 'left' / 'right'
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
" Customize fzf colors to match your color scheme
" - fzf#wrap translates this to a set of `--color` options
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'hl': ['fg', 'Comment'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Statement'],
\ 'info': ['fg', 'PreProc'],
\ 'border': ['fg', 'Ignore'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
" Don't use tmux, prefer to use vim jobs
let g:dispatch_no_tmux_make = 1
if has( 'win32' ) && !has('win32unix')
set rtp+=~/vimfiles/bundle/Vundle.vim
let s:plugindir='~/vimfiles/bundle'
else
set rtp+=~/.vim/bundle/Vundle.vim
let s:plugindir='~/.vim/bundle'
endif
call vundle#begin(s:plugindir)
Plugin 'gmarik/Vundle.vim'
Plugin 'editorconfig/editorconfig-vim'
" Development environment
let g:vimspector_base_dir = expand( '<sfile>:p:h' ) . '/vimspector-conf'
let g:ycm_java_jdtls_extension_path=[
\ g:vimspector_base_dir . '/gadgets/macos' ]
if get(g:, 'benj_test_ycm')
if has_key( g:, 'ycm_path' )
let &rtp .= ',' .. g:ycm_path
elseif exists( '$PATH_TO_YCM' )
let &rtp .= ',' .. $PATH_TO_YCM
else
Plugin 'puremourning/YouCompleteMe', { 'pinned': 1 }
endif
Plugin 'puremourning/vimspector', { 'pinned': 1 }
"let g:ycm_roslyn_binary_path=expand( '<sfile>:p:h' )
" \ . '/bundle/YouCompleteMe/third_party/ycmd/third_party/omnisharp-roslyn/run'
else
Plugin 'puremourning/YouCompleteMe', { 'name': 'YouCompleteMe-Clean' }
Plugin 'puremourning/vimspector', { 'name': 'vimspector-Clean' }
endif
if executable( '/Library/Frameworks/Mono.framework/Versions/Current/bin/mono' )
let g:ycm_mono_binary_path=
\ '/Library/Frameworks/Mono.framework/Versions/Current/bin/mono'
endif
if has( 'python3' )
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
endif
Plugin 'puremourning/neomake'
Plugin 'airblade/vim-gitgutter'
Plugin 'ntpeters/vim-better-whitespace'
" Source control
Plugin 'tpope/vim-fugitive'
" Colour schemes
Plugin 'romainl/Apprentice'
Plugin 'habamax/vim-habaurora'
Plugin 'habamax/vim-freyeday'
Plugin 'habamax/vim-saturnite'
Plugin 'habamax/vim-bronzage'
" Quality of life improvements to built-in features
Plugin 'tpope/vim-repeat'
Plugin 'wesQ3/vim-windowswap'
Plugin 'Valloric/ListToggle'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-dispatch'
Plugin 'teoljungberg/vim-grep'
Plugin 'wellle/targets.vim'
Plugin 'romainl/vim-cool'
set hlsearch
" Plugin 'ludovicchabant/vim-gutentags' (just gives errors all the damn time)
" Filetype support
Plugin 'tpope/vim-markdown'
Plugin 'dhruvasagar/vim-table-mode'
Plugin 'stephpy/vim-yaml'
Plugin 'saltstack/salt-vim'
Plugin 'leafgarland/typescript-vim'
Plugin 'cespare/vim-toml'
Plugin 'rdolgushin/groovy.vim'
Plugin 'vim-scripts/applescript.vim'
Plugin 'rust-lang/rust.vim'
Plugin 'tfnico/vim-gradle'
Plugin 'posva/vim-vue'
Plugin 'toyamarinyon/vim-swift'
Plugin 'keith/swift.vim'
Plugin 'gavocanov/vim-js-indent'
Plugin 'habamax/vim-godot'
Plugin 'udalov/kotlin-vim'
Plugin 'puremourning/jai.vim'
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
Plugin 'Jupyter-vim/jupyter-vim'
Plugin 'puremourning/vim-activate-venv'
Plugin 'puremourning/vim-dirvish'
Plugin 'tpope/vim-eunuch'
call vundle#end()
filetype plugin indent on
silent! call neomake#configure#automake( 'nrwi', 250 )
" vim:ft=vim:foldmethod=marker