gedit clang plugin progress

A quick update on the gedit clang integration. Here is a screenshot of the latest visualization of errors in source code:

gedit clang plugin

You can checkout the code on github for now: https://github.com/jessevdk/gedit-code-assistance. If you want to try it out, install the gedit-devel (>= 3), llvm and llvm-devel (>= 2.8) packages and compile the plugin (see the README for more information).

This entry was posted in gedit. Bookmark the permalink.

12 Responses to gedit clang plugin progress

  1. Wow, this is really impressive :)

  2. Marcus Lundblad says:

    Nice!

    Any chance of this being ported to Anjuta?

    //Marcus

  3. Sam says:

    This is awesome. Thanks for the time and effort you put into improving gedit and working on awesome plugins like this and gedit-collaboration.

  4. Bob Bobson says:

    How do you know what command line arguments the compiler will be called with. For example, in this code, printf could be redefined on the command line to be a macro that refers to some other function that is in scope.

    Slightly contrived example I know, but in reality most software has those sort of weird things in them. Surely you’ll always be giving duff errors messages.

    • Jesse van den Kieboom says:

      @bob: yes of course. At the moment the plugin will use makefile infrastructure to deduce the command line arguments. It will basicly look at all your make rules, find out which targets have the file to be parsed as a dependency and then extract the compiler flags from simulating an execution of that target. This is not completely fool proof of course, but works actually fairly well with the projects that I tried it on. There will also be the possibility to specify compile flags manually.

      In the future we might integrate this with a project manager plugin that is also being developed.

  5. Jordy Dickinson says:

    Will this work with other languages clang supports, like C++ and Objective-C?

  6. Nadav Vinik says:

    Wow, It’s work great thanks!!!

    clang lib is missing in debian/ubuntu so I just:
    wget http://llvm.org/releases/2.9/clang+llvm-2.9-i686-linux.tgz
    tar -xzf clang+llvm-2.9-i686-linux.tgz
    mv clang+llvm-2.9-i686-linux usr
    tar czf clang+llvm-2.9-i686-linux.tar.gz usr
    fakeroot alien -d clang+llvm-2.9-i686-linux.tar.gz
    sudo dpkg -i llvm_2.9-2_all.deb

    Work great!
    (Although apply the patches in the pull request to make it compile)

  7. Pingback: jessevdk » gedit code assistance plugin

  8. mio says:

    i get this error on ubuntu 64bit:
    checking for clang_createIndex in -lclang… no
    configure: error: could not find clang library

    following the instructions provided by Nadav Vinik did not work..
    any suggestions?
    i would love to have this :)

  9. mio says:

    ok i did have to use the 64 version in the above.. :P
    now i got it to build
    i had to move the files from /usr/local/lib/gedit/plugins/ to ~/.local/share/plugins/ in order to make it show up in the plugins in gedit
    but now trying to activate the plugin instantly crashes gedit :(

  10. Pingback: Nacho's Blog » Blog Archive » gedit-code-assistance in f16

Comments are closed.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>