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
|
Description: This patch converts projets ycm_extra_conf.py to a generic
configuration for semantic completion. This patch also sets global
ycm_extra_conf in default_settings.json
Index: ycmd/.ycm_extra_conf.py
===================================================================
--- ycmd.orig/.ycm_extra_conf.py
+++ ycmd/.ycm_extra_conf.py
@@ -43,15 +43,11 @@ SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.
# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
flags = [
'-Wall',
-'-Wextra',
+#'-Wextra',
'-Werror',
'-Wno-long-long',
'-Wno-variadic-macros',
'-fexceptions',
-'-DNDEBUG',
-# You 100% do NOT need -DUSE_CLANG_COMPLETER and/or -DYCM_EXPORT in your flags;
-# only the YCM source code needs it.
-'-DUSE_CLANG_COMPLETER',
'-DYCM_EXPORT=',
# THIS IS IMPORTANT! Without the '-x' flag, Clang won't know which language to
# use when compiling headers. So it will guess. Badly. So C++ headers will be
@@ -59,30 +55,14 @@ flags = [
# For a C project, you would set this to 'c' instead of 'c++'.
'-x',
'c++',
-'-isystem',
-'cpp/pybind11',
-'-isystem',
-'cpp/BoostParts',
-'-isystem',
-get_python_inc(),
-'-isystem',
-'cpp/llvm/include',
-'-isystem',
-'cpp/llvm/tools/clang/include',
-'-I',
-'cpp/ycm',
-'-I',
-'cpp/ycm/ClangCompleter',
-'-isystem',
-'cpp/ycm/tests/gmock/gtest',
-'-isystem',
-'cpp/ycm/tests/gmock/gtest/include',
-'-isystem',
-'cpp/ycm/tests/gmock',
-'-isystem',
-'cpp/ycm/tests/gmock/include',
-'-isystem',
-'cpp/ycm/benchmarks/benchmark/include',
+# You can add the specified directory to the search path for
+# system include files.
+#'-isystem',
+#'/usr/include/c++/5',
+# You can add the specified directory to the search path for
+# include files.
+#'-I',
+#'/usr/include/gmock',
]
# Clang automatically sets the '-std=' flag to 'c++14' for MSVC 2015 or later,
Index: ycmd/ycmd/default_settings.json
===================================================================
--- ycmd.orig/ycmd/default_settings.json
+++ ycmd/ycmd/default_settings.json
@@ -13,7 +13,7 @@
"max_num_identifier_candidates": 10,
"max_num_candidates": 50,
"extra_conf_globlist": [],
- "global_ycm_extra_conf": "",
+ "global_ycm_extra_conf": "/usr/lib/ycmd/ycm_extra_conf.py",
"confirm_extra_conf": 1,
"complete_in_comments": 0,
"complete_in_strings": 1,
|