V 0.1 is now complete.
Compilation InstructionsFor windows you will need "Clang Binaries for Mingw32/x86" at
http://llvm.org/releases/download.html plus whatever it takes to normally compile plugins for codeblocks. You will need to add clang.dll, found in the bin folder and the include folder to the build options
For linux you will need a package that provides libclang.so, the debian package is libclang1. You will also need the headers, which can be found in the debian libclang-dev package.
The github directory can be found here:
https://github.com/Lalaland/ClangCompleteJust click on downloads and download the zip file. In the zip file is the codeblocks project file + the source files.
Usage InstructionsCreate a simple project and restart codeblocks.
Load the .cbplugin plugin.
Open the simple project.
When you type 3 letters of a word, '.', '->' or '::' , or press the keys Cntr-F1 codecompletion will start
Note, this plugin will probably fail on advanced projects(at least it fails on this project), just use it on simple stuff for now
I am announcing that I am starting work on an alternate code completion plugin that uses libclang to parse the code.
With very simplistic code I am starting out with this:
http://i.imgur.com/JAs6w.pngWith some images and alphabetical sorting I am here:
With correct accessibility images I am here:
No more showing of things you cannot use:
Code completion in the middle of words + local variables:
Goals for V1:
Add support for code completion without context(no '.', '->' or '::')Start code completion after 3 letters Add alternative characters(::, ->) to start code completionDetect and apply compilation settings so as to find included directories and whatnotRun first(AKA slow) parseTranslation on opening of file-
Have the first(slow) parseTranslation run in a seperate thread -
Handle switching files well(probably a map of file names to Translation Units) -
Have icons like the current code completion -
Inherit from cbCodeComepltionPlugin -
Detect location of compiler's libstd++ headers, so I do not have to rely on clang's internal detection -
Somehow inform the user that the files are still being parsed
Now I need to move into providing auxillary features such as: calltip help, find declaration, etcCurrent goals include:
- Have options including disabling images for results
- Have tooltip to help users type in parameters for functions
- Filter results by priority(going to have to use custom AutoComplete)
- Have icons show accesability(public, private, protected) as well(need libclang patch)
Bugs
- When reloading the plugin on an already open file, it will not load the file
- Any error in the proceding input will cause it to fail(and show no completion results)
NOTE: I am no longer using a patched libclang