Sublime Forum

C/C++: typedef is not detected as a symbol in "Goto Symbols"

#1

When a symbol is declared as a new type by means of a typedef, it should probably appear in the symbols list (Ctrl-R), and it doesn’t.

For instance, in the code snippet below, ‘bl’ should be a symbol.

[code]typedef struct blah bl;

struct blah {
int a;
char c;
};

int main()
{
bl b = {};

return 0;

}[/code]

0 Likes

#2

I believe the symbol list is generated based on scopes. You would have to modify the tmLanguage file to add the appropriate scope (entity.name.function maybe?) to typedef entries.

0 Likes