JDevlieghere / dotfiles

⚙ Dotfiles for Linux &macOS
MIT License
293 stars 58 forks source link

Erroneous call to FindNearest in `.vim/.ycm_extra_conf.py` #6

Closed galou closed 7 years ago

galou commented 7 years ago

In dotfiles/.vim/.ycm_extra_conf.py the function FindNearest is sometimes called with 2 arguments instead of the 3 compulsory arguments. I don't know what to put as 3rd argument so I can't make any pull request.

Thank you for providing the file, by the way!

JDevlieghere commented 7 years ago

Thanks for reporting this! I'll look into it tonight and provide a fix ASAP.

Cheers, Jonas

JDevlieghere commented 7 years ago

Seems like I totally forgot to answer, sorry about that! The third argument is an optional build directory, as explained in: #7

shivakar commented 7 years ago

Functions FlagsForClangComplete and FlagsForInclude always seem to except out and return None since FindNearest expects 3 mandatory arguments, but only 2 are supplied.

To fix this, change the definition of the function FindNearest in dotfiles/.vim/.ycm_extra_conf.py from

def FindNearest(path, target, build_folder):

to

def FindNearest(path, target, build_folder=None):
JDevlieghere commented 7 years ago

Thanks @shivakar! I've fixed it in a27e74316ba1d4372c9d80a6a1cdfcc5138d81aa