How can I get atom.io's "Go to Declaration" to really do that?

B. Clay Shannon picture B. Clay Shannon · Aug 18, 2015 · Viewed 32.1k times · Source

In atom.io, if I right click in "wrappedlabel" here:

<label class="wrappedlabel">"Be Kind to Animammals - Kiss a Duckbilled Platypus Today"</label>

...it teases me with "Go to Declaration"

Clicking does not take me to that class in the .css file in the project.

Is there a way to get this to actually work? If so, it would be an even sweeter suite. Having it tell me "Go to Declaration" and then leaving me hanging is better than telling me to "go to" [somewhere else], but still...

Answer

Richard Dev picture Richard Dev · Aug 19, 2015

"Go to declaration" works with symbols used in your project.

The feature requires ctags which need to be generated per project. This can be achieved with the command line or with an atom plugin (https://atom.io/packages/symbol-gen) .

You can follow this issue on github for further details