Skip to content

Pretty self-explanatory. Took a bunch of code from a Clang code completion example ( https://gist.github.com/Rip-Rip/758615 ) and the "Custom Completer" example that comes with Qt. Tried to keep it short and sweet by skipping lots of unnecessary bits in the custom completer example.

License

Notifications You must be signed in to change notification settings

d3fault/Text-Edit-With-Clang-Code-Completion

Repository files navigation

Text Edit with Clang Code Completion

Pretty self-explanatory. Took a bunch of code from a Clang code completion example ( https://gist.github.com/Rip-Rip/758615 ) and the "Custom Completer" example that comes with Qt. Tried to keep it short and sweet by skipping lots of unnecessary bits in the custom completer example.

Qt + Clang = <3


Tested on Debian Jessie

PREREQUISITES

Of course you need Qt dev packages installed.

For libclang:
# apt-get install libclang-dev llvm-dev

BUILD INSTRUCTIONS

Clone this repo and cd into it as normal user, then:

$ qmake
$ make

KNOWN ISSUES

Completion fails with the following one liner:
struct x { void y() { } }; static void a() x x1; x1. }
If you put your cursor after the "x1." and press ctrl+space, nothing happens (it should show auto-completion for y). The workaround is to move the very last closing curly brace onto the line below. I have no idea why this happens, if anyone does please let me know.

About

Pretty self-explanatory. Took a bunch of code from a Clang code completion example ( https://gist.github.com/Rip-Rip/758615 ) and the "Custom Completer" example that comes with Qt. Tried to keep it short and sweet by skipping lots of unnecessary bits in the custom completer example.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published