Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CDT auto-completion based on YouCompleteMe Daemon?

I’m somewhat more inclined to see what happens with the Language Server work that Microsoft, Red Hat, and others are working on. That has a chance of becoming an industry standard, and certainly an Eclipse standard.

But, no, no one I know is actively working on an external parser/indexer for CDT. If such a thing comes along and proves better than our internal ones, then we’d obviously consider it.


From: <cdt-dev-bounces@xxxxxxxxxxx> on behalf of Leo Romanoff <romixlev@xxxxxxxxx>
Reply-To: Leo Romanoff <romixlev@xxxxxxxxx>, "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Tuesday, September 6, 2016 at 2:29 PM
To: "CDT General Developers List." <cdt-dev@xxxxxxxxxxx>
Subject: [cdt-dev] CDT auto-completion based on YouCompleteMe Daemon?


I know that CDT has its own C/C++ parsers developed over many years and a lot of effort was invested into making them better and support C/C++ syntax as good as possible. I also know that in spite of all this, CDT is still having some issues with auto-completion of the C++ code written using the latest C++ standards. These issues are known and I guess CDT developers are trying to solve them. 

At the same time, quite some C++ IDEs have switched over last years to clang-based auto-completion from their own homegrown solutions (KDevelop, QtCreator, Code::Blocks, etc), because clang is pretty good when it comes to supporting the latest C++ features and it is being kept up-to-date, when standards change.

The problem with a clang-based approach is that the functionality for the auto-completion is provided by the libclang, which is a native C++ library. This is not an issue for the IDEs which are not running on top of the JVM. But Eclipse is implemented in Java and so using a native library may result in portability issues, need to support platform specific builds, etc.

Now, there are some plugins for VIM and Emacs, which were developed to provide auto-completion for a number of languages including C/C++. One of those plugins is YouCompleteMe ( 

YouCompleteMe is rather interesting in term of its architecture. It is just a thin wrapper which talks with the remote auto-completion daemon over HTTP. The daemon is called  YCMD (, i.e. YouCompleteMeDaemon. This daemon is a native process which actually loads the libclang and uses its APIs. YCMD is already supported by a number of editors including vim, emacs, Atom and Sublime. YCMD is supposed to be installed separately from the editors using it and can be used by multiple different editors at the same time. And it supports more than C/C++, e.g. C#, Go, Rust, Python, TypeScript, _javascript_.

It seems like it should be pretty trivial to integrate with YCMD and get a clang-based auto-completion for CDT. One would just need to write a thin wrapper which speaks JSON with YCMD over HTTP. No need for shipping native, platform-specific libs. No need for in-process integration with a C++ libraries, etc. IMHO, it sounds pretty interesting. 

So, my question is:
- Has the described possibility ever been considered by the CDT developers already?
- Is there any interest in having support for this feature?
- Is there anyone interested in implementing such a feature?


Back to the top