Incomplete support for Clang code completion on Ubuntu/Mint

CodeLite installation/troubleshooting forum
neildarlow
CodeLite Enthusiast
Posts: 16
Joined: Wed Oct 31, 2018 2:16 pm
Genuine User: Yes
IDE Question: C++
Location: United Kingdom
Contact:

Incomplete support for Clang code completion on Ubuntu/Mint

Post by neildarlow »

Hi,

clang-format is installed as a dependency when codelite-12.0-1unofficial is unstalled on Ubuntu/Mint but it appears that Clang code completion cannot be enabled because CodeLite hasn't been built against libclang1 which, I believe, is required to support Clang code completion. Is this a correct assessment of the situation?

Regards,
Neil
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Incomplete support for Clang code completion on Ubuntu/Mint

Post by eranif »

I can't really tell, as I don't know the situation or what error are you experiencing...
Can you please provide details about the problem you are having?
Make sure you have read the HOW TO POST thread
neildarlow
CodeLite Enthusiast
Posts: 16
Joined: Wed Oct 31, 2018 2:16 pm
Genuine User: Yes
IDE Question: C++
Location: United Kingdom
Contact:

Re: Incomplete support for Clang code completion on Ubuntu/Mint

Post by neildarlow »

The clang-format based code completion dialog contents are greyed-out.

Out of interest, I removed the codelite-12.0-1unofficial package, its repository and all dependencies and then installed the weekly codelite-12.0.10 for Bionic GTK3 variant.

I can configure clang-format code completion with this version so, going by available information on building codelite, it appears that clang-format code completion isn't enabled in the 12.0-1unoffical package.

Regards,
Neil
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Incomplete support for Clang code completion on Ubuntu/Mint

Post by eranif »

It should be available, I will try it out at home later today.
Just for FYI: clang-format is a tool that simply beautifies your code, it does not provide code completion. What you are referring here is code completion based on libclang
Make sure you have read the HOW TO POST thread
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Incomplete support for Clang code completion on Ubuntu/Mint

Post by DavidGH »

Hi,

(This is about clang code-completion, not clang-format.)
Making CodeLite's CMakeLists.txt believe that clang exists on ubuntu became much harder 2 or 3 years ago, when for some reason the libclang-dev package vanished.

I see it's now there again in ubuntu bionic, and it was installed on my build VBox guest. However it (or something else) still doesn't seem to be detected, and the error message: *** NOTICE ***: clang code completion support is disabled" still appears.

To be honest, I didn't pursue this; I don't use clang code-completion myself and, if the lack of posts/bug-reports is anything to go by, nor do many users ;) .

Regards,

David
neildarlow
CodeLite Enthusiast
Posts: 16
Joined: Wed Oct 31, 2018 2:16 pm
Genuine User: Yes
IDE Question: C++
Location: United Kingdom
Contact:

Re: Incomplete support for Clang code completion on Ubuntu/Mint

Post by neildarlow »

DavidGH wrote:Hi,
(This is about clang code-completion, not clang-format.)
Making CodeLite's CMakeLists.txt believe that clang exists on ubuntu became much harder 2 or 3 years ago, when for some reason the libclang-dev package vanished.
Yes, it's confusing when a technology is used in two differing aspects and I'm probably suffering the consequences.

Clang detection in the CMake build system is still a problem. I add the following environment variables to my Clang/CMake projects to force its use:

Code: Select all

CC=/usr/bin/clang
CXX=/usr/bin/clang++
The issue with clang-format is, of course, with Source Code Formatting. Code completion is related to use of libclang-6.0-dev and libclang1-6.0.

Regards,
Neil Darlow
Post Reply