code completion in codelite using libclang


This document refers to codelite 4.1 and up, if you are still using an older version of codelite please use this guide

Enabling clang code completion


By default, clang code completion is disabled. You can enable it from Settings -> Code Completion -> clang

clang has 2 working mode:

  • As a backup code completion to ctags, this means that in case ctags will fail to code-complete, clang will kick-in
  • As the primary code completion - clang is the default and the only code completion used by codelite

Once clang completion is enabled, you will need to perform at least one full rebuild of your workspace.
This is required so codelite can collect the exact compilation command line for each file in your workspace, this information is stored into a small
SQLite database.

clang for custom makefile projects


With codelite 4.1, the only difference between standard codelite project and a custom project is that for a custom
makefile project you need to define these 2 environment variables from: settings -> environment variables:

 CXX=codelitegcc g++
 CC=codelitegcc gcc

Once they defined, you need to perform at least one full rebuild of your workspace

clang for custom projects with CMake


If your project is configured as a custom makefile project that uses a CMake generated files there are 2 things you need to do in order
to enable the clang code completion:

  • Define these 2 environment variables in codelite:
 CXX=codelitegcc g++
 CC=codelitegcc gcc

Regenerate the makefiles and perform a full rebuild

Edit - History - Print - Recent Changes - Search
Page last modified on September 23, 2015, at 09:35 AM