File: 03-do-not-override-unset-ycmd-settings.patch

package info (click to toggle)
vim-youcompleteme 0%2B20240827%2Bgitb6e8c64%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,436 kB
  • sloc: python: 10,914; sh: 204; cpp: 141; makefile: 26; f90: 5; xml: 1
file content (642 lines) | stat: -rw-r--r-- 18,813 bytes parent folder | download | duplicates (2)
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
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
Description: Load ycmd default settings from its default_settings.json
 Upstream prefers to keep the configuration in one place, but as Debian has
 ycmd and vim-youcompleteme in two different packages and can update them
 independently it makes more sense to not override the defaults ycmd has
 as that would require updating both packages then.
 .
 This is still the case as the configuration options are only documented here
 as they can only be changed sensible from here by the user, but it allows at
 least the package maintainer to change options in one place and only have the
 documentation lagging behind (or ahead) slightly.
Author: David Kalnischkies <donkult@debian.org>
Forwarded: yes, but refused: https://github.com/ycm-core/YouCompleteMe/issues/3639
Last-Update: 2020-10-28

--- a/README.md
+++ b/README.md
@@ -2625,7 +2625,7 @@
 Setting this option to a high number like `99` effectively turns off the
 identifier completion engine and just leaves the semantic engine.
 
-Default: `2`
+Default: `2` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_min_num_of_chars_for_completion = 2
@@ -2642,7 +2642,7 @@
 **NOTE:** This option only applies to the identifier completer; it has no effect
 on the various semantic completers.
 
-Default: `0`
+Default: `0` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_min_num_identifier_candidate_chars = 0
@@ -2662,7 +2662,7 @@
 recommended as it will slow down completion when there is a very large number
 of suggestions.
 
-Default: `50`
+Default: `50` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_max_num_candidates = 50
@@ -2719,7 +2719,7 @@
 recommended as it will slow down completion when there is a very large number
 of suggestions.
 
-Default: `10`
+Default: `10` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_max_num_identifier_candidates = 10
@@ -2751,7 +2751,7 @@
 `g:ycm_key_list_select_completion` (or similar) to `<plug>(YCMComplete)`. In
 practice that means that you can't use `<Tab>` for this.
 
-Default: `1`
+Default: `1` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_auto_trigger = 1
@@ -2850,7 +2850,7 @@
 
 You can get the filetype of the current file in Vim with `:set ft?`.
 
-Default: `[see next line]`
+Default: `[see next line]` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_filetype_specific_completion_to_disable = {
@@ -3186,7 +3186,7 @@
 identifiers from strings and comments. Otherwise, the text in comments and
 strings will be ignored.
 
-Default: `0`
+Default: `0` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_collect_identifiers_from_comments_and_strings = 0
@@ -3292,7 +3292,7 @@
 
 To see where the log files are, call `:YcmDebugInfo`.
 
-Default: `0`
+Default: `0` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_keep_logfiles = 0
@@ -3321,7 +3321,7 @@
 When set to `1`, the OmniSharp-Roslyn server will be automatically started
 (once per Vim session) when you open a C# file.
 
-Default: `1`
+Default: `1` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_auto_start_csharp_server = 1
@@ -3332,7 +3332,7 @@
 When set to `1`, the OmniSharp-Roslyn server will be automatically stopped upon
 closing Vim.
 
-Default: `1`
+Default: `1` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_auto_stop_csharp_server = 1
@@ -3344,7 +3344,7 @@
 the OmniSharp-Roslyn server to listen on. When set to `0` uses an unused port provided
 by the OS.
 
-Default: `0`
+Default: `0` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_csharp_server_port = 0
@@ -3541,10 +3541,10 @@
 
 You can place such a global file anywhere in your filesystem.
 
-Default: `''`
+Default: `'/usr/lib/ycmd/ycm_extra_conf.py'` (set by Debian's `ycmd` package)
 
 ```viml
-let g:ycm_global_ycm_extra_conf = ''
+let g:ycm_global_ycm_extra_conf = '/usr/lib/ycmd/ycm_extra_conf.py'
 ```
 
 ### The `g:ycm_confirm_extra_conf` option
@@ -3556,7 +3556,7 @@
 To selectively get YCM to ask/not ask about loading certain `.ycm_extra_conf.py`
 files, see the `g:ycm_extra_conf_globlist` option.
 
-Default: `1`
+Default: `1` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_confirm_extra_conf = 1
@@ -3596,7 +3596,7 @@
 `os.path.expanduser()` and then resolved with `os.path.abspath()` before being
 matched against the filename.
 
-Default: `[]`
+Default: `[]` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_extra_conf_globlist = []
@@ -3609,7 +3609,7 @@
 Setting this option will force YCM to always interpret relative paths as being
 relative to Vim's current working directory.
 
-Default: `0`
+Default: `0` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_filepath_completion_use_working_dir = 0
@@ -3638,7 +3638,7 @@
 
 **NOTE:** The regex syntax is **NOT** Vim's, it's [Python's][python-re].
 
-Default: `[see next line]`
+Default: `{}` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_semantic_triggers =  {
@@ -3678,7 +3678,7 @@
 Default: `1`
 
 ```viml
-let g:ycm_use_ultisnips_completer = 1
+let g:ycm_use_ultisnips_completer = 1 (set by Debian's `ycmd` package)
 ```
 
 ### The `g:ycm_goto_buffer_command` option
@@ -3726,6 +3726,22 @@
 let g:ycm_disable_for_files_larger_than_kb = 1000
 ```
 
+### The `g:ycm_use_clang` option (Debian specific)
+
+This option controls whether **clang** should be used as completion engine for
+C-family languages. Can take one of the following values: `1`, `0`, with
+meanings:
+
+- `1`: YCM will use the built in clang-library-based completer
+if the **clangd** completer is not available or disabled.
+- `0`: YCM will never use clang completer.
+
+Default: `1` (set by Debian's `ycmd` package)
+
+```viml
+let g:ycm_use_clang = 1
+```
+
 ### The `g:ycm_use_clangd` option
 
 This option controls whether **clangd** should be used as a completion engine for
@@ -3736,7 +3752,7 @@
 provided with `ycm_clangd_binary_path` option.
 - `0`: YCM will never use clangd completer.
 
-Default: `1`
+Default: `1` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_use_clangd = 1
@@ -3747,10 +3763,10 @@
 When `ycm_use_clangd` option is set to `1`, this option sets the path to
 **clangd** binary.
 
-Default: `''`
+Default: `'/usr/bin/clangd'` (set by Debian's `ycmd` package)
 
 ```viml
-let g:ycm_clangd_binary_path = ''
+let g:ycm_clangd_binary_path = '/usr/bin/clangd'
 ```
 
 ### The `g:ycm_clangd_args` option
@@ -3758,7 +3774,7 @@
 This option controls the command line arguments passed to the clangd binary. It
 appends new options and overrides the existing ones.
 
-Default: `[]`
+Default: `[]` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_clangd_args = []
@@ -3772,7 +3788,7 @@
 - `1`: Uses ycmd's caching and filtering logic.
 - `0`: Uses clangd's caching and filtering logic.
 
-Default: `1`
+Default: `1` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_clangd_uses_ycmd_caching = 1
@@ -3790,10 +3806,20 @@
 
 Many working examples can be found in the YCM [lsp-examples][] repo.
 
-Default: `[]`
+Default: `[see next line]` (set by Debian's `ycmd` package)
 
 ```viml
-let g:ycm_language_server = []
+let g:ycm_language_server =
+  \ [{
+  \   'name': 'ccls',
+  \   'cmdline': [ 'ccls' ],
+  \   'filetypes': [ 'c', 'cpp', 'cuda', 'objc', 'objcpp' ],
+  \   'project_root_files': [ '.ccls-root', 'compile_commands.json' ]
+  \ }, {
+  \   'name': 'fortran',
+  \   'filetypes': [ 'fortran' ],
+  \   'cmdline': [ 'fortls' ]
+  \ }]
 ```
 
 ### The `g:ycm_disable_signature_help` option
@@ -3801,7 +3827,7 @@
 This option allows you to disable all signature help for all completion engines.
 There is no way to disable it per-completer.
 
-Default: `0`
+Default: `0` (set by Debian's `ycmd` package)
 
 ```viml
 " Disable signature help
@@ -3835,7 +3861,7 @@
 Similar to [the `g:ycm_clangd_args`](#the-gycm-clangd-args), this option allows
 passing additional flags to the `gopls` command line.
 
-Default: `[]`
+Default: `[]` (set by Debian's `ycmd` package)
 
 ```viml
 let g:ycm_gopls_args = []
--- a/doc/youcompleteme.txt
+++ b/doc/youcompleteme.txt
@@ -2919,7 +2919,7 @@
 Setting this option to a high number like '99' effectively turns off the
 identifier completion engine and just leaves the semantic engine.
 
-Default: '2'
+Default: '2' (set by Debian's ycmd package)
 >
   let g:ycm_min_num_of_chars_for_completion = 2
 <
@@ -2935,7 +2935,7 @@
 **NOTE:** This option only applies to the identifier completer; it has no
 effect on the various semantic completers.
 
-Default: '0'
+Default: '0' (set by Debian's ycmd package)
 >
   let g:ycm_min_num_identifier_candidate_chars = 0
 <
@@ -2953,7 +2953,7 @@
 recommended as it will slow down completion when there is a very large number
 of suggestions.
 
-Default: '50'
+Default: '50' (set by Debian's ycmd package)
 >
   let g:ycm_max_num_candidates = 50
 <
@@ -3008,7 +3008,7 @@
 recommended as it will slow down completion when there is a very large number
 of suggestions.
 
-Default: '10'
+Default: '10' (set by Debian's ycmd package)
 >
   let g:ycm_max_num_identifier_candidates = 10
 <
@@ -3037,7 +3037,7 @@
 |g:ycm_key_list_select_completion| (or similar) to '<plug>(YCMComplete)'. In
 practice that means that you can't use '<Tab>' for this.
 
-Default: '1'
+Default: '1' (set by Debian's ycmd package)
 >
   let g:ycm_auto_trigger = 1
 <
@@ -3131,7 +3131,7 @@
 
 You can get the filetype of the current file in Vim with ':set ft?'.
 
-Default: '[see next line]'
+Default: '[see next line]' (set by Debian's ycmd package)
 >
   let g:ycm_filetype_specific_completion_to_disable = {
         \ 'gitcommit': 1
@@ -3153,7 +3153,7 @@
 <
 You can get the filetype of the current file in Vim with ':set ft?'.
 
-Default: '[see next line]'
+Default: '[see next line]' (set by Debian's ycmd package)
 >
   let g:ycm_filepath_blacklist = {
         \ 'html': 1,
@@ -3453,7 +3453,7 @@
 identifiers from strings and comments. Otherwise, the text in comments and
 strings will be ignored.
 
-Default: '0'
+Default: '0' (set by Debian's ycmd package)
 >
   let g:ycm_collect_identifiers_from_comments_and_strings = 0
 <
@@ -3550,7 +3550,7 @@
 
 To see where the log files are, call |:YcmDebugInfo|.
 
-Default: '0'
+Default: '0' (set by Debian's ycmd package)
 >
   let g:ycm_keep_logfiles = 0
 <
@@ -3573,7 +3573,7 @@
 When set to '1', the OmniSharp-Roslyn server will be automatically started
 (once per Vim session) when you open a C# file.
 
-Default: '1'
+Default: '1' (set by Debian's ycmd package)
 >
   let g:ycm_auto_start_csharp_server = 1
 <
@@ -3583,7 +3583,7 @@
 When set to '1', the OmniSharp-Roslyn server will be automatically stopped upon
 closing Vim.
 
-Default: '1'
+Default: '1' (set by Debian's ycmd package)
 >
   let g:ycm_auto_stop_csharp_server = 1
 <
@@ -3594,7 +3594,7 @@
 OmniSharp-Roslyn server to listen on. When set to '0' uses an unused port
 provided by the OS.
 
-Default: '0'
+Default: '0' (set by Debian's ycmd package)
 >
   let g:ycm_csharp_server_port = 0
 <
@@ -3780,9 +3780,9 @@
 
 You can place such a global file anywhere in your filesystem.
 
-Default: "''"
+Default: "'/usr/lib/ycmd/ycm_extra_conf.py'" (set by Debian's ycmd package)
 >
-  let g:ycm_global_ycm_extra_conf = ''
+  let g:ycm_global_ycm_extra_conf = '/usr/lib/ycmd/ycm_extra_conf.py'
 <
 -------------------------------------------------------------------------------
 The *g:ycm_confirm_extra_conf* option
@@ -3794,7 +3794,7 @@
 To selectively get YCM to ask/not ask about loading certain
 '.ycm_extra_conf.py' files, see the |g:ycm_extra_conf_globlist| option.
 
-Default: '1'
+Default: '1' (set by Debian's ycmd package)
 >
   let g:ycm_confirm_extra_conf = 1
 <
@@ -3833,7 +3833,7 @@
 'os.path.expanduser()' and then resolved with 'os.path.abspath()' before being
 matched against the filename.
 
-Default: '[]'
+Default: '[]' (set by Debian's ycmd package)
 >
   let g:ycm_extra_conf_globlist = []
 <
@@ -3845,7 +3845,7 @@
 Setting this option will force YCM to always interpret relative paths as being
 relative to Vim's current working directory.
 
-Default: '0'
+Default: '0' (set by Debian's ycmd package)
 >
   let g:ycm_filepath_completion_use_working_dir = 0
 <
@@ -3873,7 +3873,7 @@
 
 **NOTE:** The regex syntax is **NOT** Vim's, it's Python's [94].
 
-Default: '[see next line]'
+Default: '{}' (set by Debian's ycmd package)
 >
   let g:ycm_semantic_triggers =  {
     \   'c': ['->', '.'],
@@ -3908,7 +3908,7 @@
 By default, YCM will query the UltiSnips plugin for possible completions of
 snippet triggers. This option can turn that behavior off.
 
-Default: '1'
+Default: '1' (set by Debian's ycmd package)
 >
   let g:ycm_use_ultisnips_completer = 1
 <
@@ -3953,6 +3953,21 @@
   let g:ycm_disable_for_files_larger_than_kb = 1000
 <
 -------------------------------------------------------------------------------
+The *g:ycm_use_clang* option (Debian specific)
+
+This option controls whether **clang** should be used as completion engine for
+C-family languages. Can take one of the following values: `1`, `0`, with
+meanings:
+
+- `1`: YCM will use the built in clang-library-based completer
+if the **clangd** completer is not available or disabled.
+- `0`: YCM will never use clang completer.
+
+Default: `1` (set by Debian's ycmd package)
+>
+  let g:ycm_use_clang = 1
+<
+-------------------------------------------------------------------------------
 The *g:ycm_use_clangd* option
 
 This option controls whether **clangd** should be used as a completion engine
@@ -3963,7 +3978,7 @@
   provided with 'ycm_clangd_binary_path' option.
 - '0': YCM will never use clangd completer.
 
-Default: '1'
+Default: '1' (set by Debian's ycmd package)
 >
   let g:ycm_use_clangd = 1
 <
@@ -3973,9 +3988,9 @@
 When 'ycm_use_clangd' option is set to '1', this option sets the path to
 **clangd** binary.
 
-Default: "''"
+Default: "'/usr/bin/clangd'" (set by Debian's ycmd package)
 >
-  let g:ycm_clangd_binary_path = ''
+  let g:ycm_clangd_binary_path = '/usr/bin/clangd'
 <
 -------------------------------------------------------------------------------
 The *g:ycm_clangd_args* option
@@ -3983,7 +3998,7 @@
 This option controls the command line arguments passed to the clangd binary. It
 appends new options and overrides the existing ones.
 
-Default: '[]'
+Default: '[]' (set by Debian's ycmd package)
 >
   let g:ycm_clangd_args = []
 <
@@ -4013,9 +4028,17 @@
 
 Many working examples can be found in the YCM lsp-examples [79] repo.
 
-Default: '[]'
+Default: '[]' (set by Debian's ycmd package)
 >
-  let g:ycm_language_server = []
+  " ccls is actually configured as fallback in Debian if clangd and
+  " libclang-based completers are disabled or otherwise unavailable
+  let g:ycm_language_server =
+    \ [{
+    \   'name': 'ccls',
+    \   'cmdline': [ 'ccls' ],
+    \   'filetypes': [ 'c', 'cpp', 'cuda', 'objc', 'objcpp' ],
+    \   'project_root_files': [ '.ccls-root', 'compile_commands.json' ]
+    \ }]
 <
 -------------------------------------------------------------------------------
 The *g:ycm_disable_signature_help* option
@@ -4023,7 +4046,7 @@
 This option allows you to disable all signature help for all completion
 engines. There is no way to disable it per-completer.
 
-Default: '0'
+Default: '0' (set by Debian's ycmd package)
 >
   " Disable signature help
   let g:ycm_disable_signature_help = 1
@@ -4055,7 +4078,7 @@
 Similar to the |g:ycm_clangd_args|, this option allows passing additional flags
 to the 'gopls' command line.
 
-Default: '[]'
+Default: '[]' (set by Debian's ycmd package)
 >
   let g:ycm_gopls_args = []
 <
--- a/plugin/youcompleteme.vim
+++ b/plugin/youcompleteme.vim
@@ -200,91 +200,21 @@
 
 "
 " List of ycmd options.
+" Beware: We (Debian) load the defaults directly from ycmd
+" instead of embedding the values here as upstream does.
 "
-let g:ycm_filepath_completion_use_working_dir =
-      \ get( g:, 'ycm_filepath_completion_use_working_dir', 0 )
-
-let g:ycm_auto_trigger =
-      \ get( g:, 'ycm_auto_trigger', 1 )
-
-let g:ycm_min_num_of_chars_for_completion =
-      \ get( g:, 'ycm_min_num_of_chars_for_completion', 2 )
-
-let g:ycm_min_identifier_candidate_chars =
-      \ get( g:, 'ycm_min_num_identifier_candidate_chars', 0 )
-
-let g:ycm_semantic_triggers =
-      \ get( g:, 'ycm_semantic_triggers', {} )
-
-let g:ycm_filetype_specific_completion_to_disable =
-      \ get( g:, 'ycm_filetype_specific_completion_to_disable',
-      \      { 'gitcommit': 1 } )
-
-let g:ycm_collect_identifiers_from_comments_and_strings =
-      \ get( g:, 'ycm_collect_identifiers_from_comments_and_strings', 0 )
-
-let g:ycm_max_num_identifier_candidates =
-      \ get( g:, 'ycm_max_num_identifier_candidates', 10 )
-
-let g:ycm_max_num_candidates =
-      \ get( g:, 'ycm_max_num_candidates', 50 )
-
-let g:ycm_extra_conf_globlist =
-      \ get( g:, 'ycm_extra_conf_globlist', [] )
-
-let g:ycm_global_ycm_extra_conf =
-      \ get( g:, 'ycm_global_ycm_extra_conf', '' )
-
-let g:ycm_confirm_extra_conf =
-      \ get( g:, 'ycm_confirm_extra_conf', 1 )
-
-let g:ycm_max_diagnostics_to_display =
-      \ get( g:, 'ycm_max_diagnostics_to_display', 30 )
-
-let g:ycm_filepath_blacklist =
-      \ get( g:, 'ycm_filepath_blacklist', {
-      \   'html': 1,
-      \   'jsx': 1,
-      \   'xml': 1
-      \ } )
-
-let g:ycm_auto_start_csharp_server =
-      \ get( g:, 'ycm_auto_start_csharp_server', 1 )
-
-let g:ycm_auto_stop_csharp_server =
-      \ get( g:, 'ycm_auto_stop_csharp_server', 1 )
-
-let g:ycm_use_ultisnips_completer =
-      \ get( g:, 'ycm_use_ultisnips_completer', 1 )
-
-let g:ycm_csharp_server_port =
-      \ get( g:, 'ycm_csharp_server_port', 0 )
-
-let g:ycm_use_clangd =
-      \ get( g:, 'ycm_use_clangd', 1 )
-
-let g:ycm_clangd_binary_path =
-      \ get( g:, 'ycm_clangd_binary_path', '' )
-
-let g:ycm_clangd_args =
-      \ get( g:, 'ycm_clangd_args', [] )
-
-let g:ycm_clangd_uses_ycmd_caching =
-      \ get( g:, 'ycm_clangd_uses_ycmd_caching', 1 )
-
-" These options are not documented.
-let g:ycm_java_jdtls_extension_path =
-      \ get( g:, 'ycm_java_jdtls_extension_path', [] )
-
-let g:ycm_java_jdtls_use_clean_workspace =
-      \ get( g:, 'ycm_java_jdtls_use_clean_workspace', 1 )
-
-let g:ycm_java_jdtls_workspace_root_path =
-      \ get( g:, 'ycm_java_jdtls_workspace_root_path', '' )
-
-" This option is deprecated.
-let g:ycm_python_binary_path =
-      \ get( g:, 'ycm_python_binary_path', '' )
+if exists( '*json_decode' )
+  let s:option_file = '/usr/lib/ycmd/ycmd/default_settings.json'
+  if filereadable( s:option_file )
+    let s:default_options = json_decode( join( readfile( s:option_file ) ) )
+    for key in keys( s:default_options )
+      if ! has_key( g:, 'ycm_' . key )
+        let g:[ 'ycm_' . key ] = s:default_options[ key ]
+      endif
+    endfor
+    unlet key
+  endif
+endif
 
 let g:ycm_refilter_workspace_symbols =
       \ get( g:, 'ycm_refilter_workspace_symbols', 1 )