I don't mean function/variables and other tags, those works well.
Because I have a file containing many Cairo library functions, I want to complete these functions in a new file. Of course, the Cairo library has no available tags file for geany, and the Cairo function in the first file is not recognized as a function. So I want to ask, can you add this function?
I've tried `geany -g -P` and other methods. no way can do it.
Because I have a file containing many Cairo library functions
Do you mean the source of Cairo or do you mean your own code which just happens to use Cairo functions?
I want to complete these functions in a new file
Function _defined_ in an open file in the same (or similar, eg C/C++) language will be available for autocomplete in other files of the same language. But just using a function in your file is not a definition and is not recognised for autocomplete or the symbol pane. Also files included in your files are not parsed, so `#include <cairo.h>` will not make cairo functions available for autocomplete.
I've tried geany -g -P
You probably don't want the -P, you want the preprocessor to pull in the headers included from `cairo.h`
I've tried `geany -g -P` and other methods. no way can do it.
I guess you already read the docs about tags generation? https://www.geany.org/manual/current/index.html#generating-a-global-tags-fil...
But you might also find the following two plugins useful: https://github.com/geany/geany-plugins/tree/master/geanyctags
https://github.com/geany/geany-plugins/tree/master/projectorganizer
Probably projectorganizer solves your problem best.
Thanks for advise. But I do not want more plugins for this, because geany has done things well.
I may not have expressed it clearly before. Let me give another example.
FileA.c contains: ``` cairo_fill (ctx); cairo_restore (ctx); cairo_save (ctx); gdk_rgba_parse (cc, TIMER_F_COLOR); ``` **those 4 functions is not recognized as a function/symbols**, BUT I can complete this 4 in FileA.c **immediatelly**. This may be called "auto complete in current document"? That my favourite function in geany.
Many times, I wrote a new FileB.c, I want save input time, I open FileA.c beside then I want can also auto complete those 4 functions in FileB.c.
I like lightweight geany to go, so I do not want save a lot of gloabal tags in `~/.config/geany/tags` directory. And I do not want join them into a project, for most time this two file is belong to defferent project. Of course manually `[Generating a global tags file](https://www.geany.org/manual/current/index.html#id85)%60 is also not work, for those is not funcions/symbols.
May I call it as "auto complete in all opened documents". This is nothing with "workspace symbols" or "global tags files".
For names to autocomplete in filea.c without being recognised as symbols you must have `Edit->Preferences->Editor->Autocomplete all words in document` set.
As the name says it autocompletes words _in the document_, not between documents.
This setting is for use in documentation when there is no symbol detection. For programming languages, symbol definitions are detected to provide additional useful information such as function parameters and to limit autocomplete to the same language, but you need to see the definitions in an open file or loaded tag file.
When any word in a document is considered for autocomplete, making all words, in all documents open, available in all other open documents will likely result in too many autocompletes to be useful, and probably won't happen.
I got it. Thanks
Closed #3123.
github-comments@lists.geany.org