]> git.rmz.io Git - dotfiles.git/blobdiff - vim/ycm_extra_conf.py
vim: add close preview mapping
[dotfiles.git] / vim / ycm_extra_conf.py
index ab42d2744922a3d2f34dca68c79e63ae675f526a..f0e3679a8182bb48a2189e894b5bbc1471089497 100644 (file)
@@ -15,13 +15,15 @@ def FlagsForFile(filename, **kwargs):
         # '-Wno-variadic-macros',
         # '-fexceptions',
         # '-DNDEBUG',
-        '-std=c++11',
+        '-std=c++14',
         '-stdlib=libstdc++',
         '-x', 'c++',
+        '-isystem', '/usr/include',
+        '-isystem', '/usr/local/include',
+        '-isystem', '/usr/include/qt',
         '-I', '.',
         '-I', './include',
     ]
-    flags += rospack()
     relative_to = cwd
     final_flags = MakeRelativePathsInFlagsAbsolute(flags, relative_to)
 
@@ -30,22 +32,6 @@ def FlagsForFile(filename, **kwargs):
         'do_cache': True
     }
 
-# This function makes it easy to pull in additional flags from rospack
-def rospack():
-    cmd = ['rospack', 'cflags-only-I']
-    try:
-        out = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE).stdout
-    except:
-        return []
-    line = out.readline()[:-1].split(" ")
-    includes = []
-    for include in line:
-        if include.startswith(os.path.expanduser('~')):
-            includes += ['-I', include]
-        else:
-            includes += ['-isystem', include]
-    return filter(lambda a: a != ' ', includes)
-
 
 def DirectoryOfThisScript():
     return os.path.dirname(os.path.abspath(__file__))