You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2020/02/26 19:16:02 UTC
[kudu] branch master updated: [ycm] Support recent versions of
YouCompleteMe
This is an automated email from the ASF dual-hosted git repository.
adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 8b043e8 [ycm] Support recent versions of YouCompleteMe
8b043e8 is described below
commit 8b043e8971f97274c620ba1c235ff47a3c5344ce
Author: Michael Percy <mp...@fb.com>
AuthorDate: Tue Feb 11 15:30:54 2020 -0800
[ycm] Support recent versions of YouCompleteMe
The Vim plugin YouCompleteMe now looks for a Settings() method in the
.ycm_extra_conf.py file instead of FlagsForFile(). According to some bug
reports I saw, they claim to be backwards-compatible, but that wasn't my
experience using --clang-completer. This patch just adds a Settings()
call that invokes FlagsForFile(), and leaves FlagsForFile() in place for
backcompat with older versions of YCM. This works for me on the latest
master version of YCM.
Change-Id: I21cc5e2cf05f91c1a6ed44cfbacc5b325438f5b7
Reviewed-on: http://gerrit.cloudera.org:8080/15296
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
.ycm_extra_conf.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py
index 1660d49..11befbf 100644
--- a/.ycm_extra_conf.py
+++ b/.ycm_extra_conf.py
@@ -114,4 +114,10 @@ def FlagsForFile( filename, **kwargs ):
return {
'flags': final_flags,
'do_cache': True
+ # TODO(mpercy): Also return override_filename for new ycmd?
}
+
+def Settings( **kwargs ):
+ """ Latest YCM looks for Settings() instead of FlagsForFile(). """
+ if kwargs[ 'language' ] == 'cfamily':
+ return FlagsForFile( kwargs['filename'] )