]> git.rmz.io Git - dotfiles.git/commitdiff
vim: remove rospack from ycm_extra_conf
authorSamir Benmendil <me@rmz.io>
Tue, 18 Oct 2016 12:51:05 +0000 (13:51 +0100)
committerSamir Benmendil <me@rmz.io>
Tue, 18 Oct 2016 12:54:57 +0000 (13:54 +0100)
vim/ycm_extra_conf.py

index ab42d2744922a3d2f34dca68c79e63ae675f526a..0e3b5da74524f743d1fb83162c44a49bf06db33d 100644 (file)
@@ -21,7 +21,6 @@ def FlagsForFile(filename, **kwargs):
         '-I', '.',
         '-I', './include',
     ]
-    flags += rospack()
     relative_to = cwd
     final_flags = MakeRelativePathsInFlagsAbsolute(flags, relative_to)
 
@@ -30,22 +29,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__))