From: Samir Benmendil Date: Tue, 18 Oct 2016 12:51:05 +0000 (+0100) Subject: vim: remove rospack from ycm_extra_conf X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/1ce562c61664d2e28a69b869a320513e87fbea76 vim: remove rospack from ycm_extra_conf --- diff --git a/vim/ycm_extra_conf.py b/vim/ycm_extra_conf.py index ab42d27..0e3b5da 100644 --- a/vim/ycm_extra_conf.py +++ b/vim/ycm_extra_conf.py @@ -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__))