Packages: [C] Go to definition to enum value?

Created on 15 Nov 2016  路  5Comments  路  Source: sublimehq/Packages

enum {
   VALUE_1 = 0,
   VALUE_2,
   VALUE_3
}

It seems 'Go to definition' is not working in this case in *.c *.h files. Any help?

enhancement

Most helpful comment

It going to require some learning, but here are some resources:

All 5 comments

Currently enum values aren't indexed by the indexer, thus "Go to definition" doesn't work with them. This is probably a pretty reasonable addition, assuming it is a C enum and not a C++ enum class.

Are you familiar with syntax definitions for Sublime Text at all? If so, I can give you some pointers that may help in creating a PR to add this functionality.

I have no idea what I am doing, but I am trying to do this. Where I edit the indexer?

@wbond Thanks! However I have no idea how to add syntax definition for sublime text. ^^;
Is there anything I should look for or I should be aware of? I'd love to try it myself.

It going to require some learning, but here are some resources:

There's a PR to address this here: https://github.com/sublimehq/Packages/pull/976

Was this page helpful?
0 / 5 - 0 ratings