Geany: Syntax highlighting and autocomplete doesn't work unless I have the header file open in geany

i've encountered this same problem today..

geany must know where to look to get a valid list of symbols and so it read the sources of all the opened files, so if you want a useful symbol list you should open all the header files you need before start programming..

even if geany want to look automagically in the header files you include it will not be able to guess which gtk version you want use for your project (gtk2, gtk3, ...)..

remember that geany is lightweigth :-)

but here is my workaround.. (i guess you are on linux and you have a shell, gcc, etc)

to get the job done i did this :

echo "#include <gtk/gtk.h>" > gtk_headers.c
gcc -E gtk_headers.c `pkg-config gtk+-3.0 --cflags --libs` -o gtk_headers.h

(i'm working with gtk version 3, adjust the pkg-config line to meet your needs)

then i open my project files and gtk_headers.h, this way geany can rip the headers of the gtk library i'm working on..

pro : simple

cons : the headers i open in geany is ~1.6 MB O_o