atom / symbols-view

Jump to symbols in Atom
MIT License
165 stars 115 forks source link

Incorrect list of symbols in PHP #175

Open 50Wliu opened 8 years ago

50Wliu commented 8 years ago

From @sebastien-gallet on January 17, 2016 2:40

In PHP, if a function name first character is lowercased and the parameter is a strongly typed initialized array: screen shot 2016-01-17 at 10 59 52 am

Then pressing the shortcut "Goto Symbol", the list of symbols shows the parameter name instead of the function name. (As a side note, somehow it pick "name" in the comment as a symbol as well.) screen shot 2016-01-17 at 11 00 00 am

Copied from original issue: atom/language-php#118

50Wliu commented 8 years ago

From @tommyvdv on January 25, 2016 14:55

I believe i'm having the same issue in this example and hope a few extra examples can help you pinpoint the source of the problem.

1 2 3

The symbol definition for an optional parameter named $locale seems to override the method name.

In dense classes i'm also getting some hits on the code inside methods. This makes it hard to navigate some files. Disregard this if this behavior is intentional (I'm new to Atom and was a sublime user).

4

edit: I've discovered that the package goto solves the inaccurate symbols.

50Wliu commented 8 years ago

From @bj7 on May 7, 2016 17:46

I also experience an issue with the symbol list not being correct in PHP files. I have a function: image When using Command-R (Mac) and searching on view, all I get back is the name of my class: image

Which file handles symbol list definitions? I would be glad to investigate.

hultberg commented 8 years ago

I'm seeing this issue all the time. I also struggle to find several methods in big classes. I end up just searching for them with cmd+f

bj7 commented 8 years ago

I'll try to take a look at this in my spare time to determine a cause.

mcdado commented 7 years ago

Moreover, declaration of class properties are reported as symbols, just like local variables inside class methods!

screen shot 2016-08-19 at 21 21 02

This makes symbols-view in php almost useless.

nathanpitman commented 7 years ago

I've had the same issue, as someone switching from Sublime the behaviour of Cmd-R is not what I expected and pretty much useless. The Goto package is perfect though. :)

godcong commented 7 years ago

happy new year issus

pablopunk commented 7 years ago

@50Wliu any plans on this issue? It's a big deal when I use atom at work

50Wliu commented 7 years ago

Nope. Anyone is free to investigate this issue and submit a PR though.