garveen / docphp

DocPHPManualer: Show PHP documentation in Sublime Text 3
MIT License
52 stars 10 forks source link

Automatically going to function definition #6

Closed MalcolmK closed 7 years ago

MalcolmK commented 7 years ago

Hey!

When I hover on a function call (let's say $this->getId()) in al file, it automatically jumps to the function definition. I think this is unwanted? I would like to popup function definitions from the php documentation, not from my own file. And certainly I don't like to jump across my file.

Kind regards,

Malcolm

garveen commented 7 years ago

I have thought about it. Without parsing all the files in projects, it's hard to get user defined functions' parameters and comments, and more diffcult to differentiate Foo::getId() and Bar::getId(). By now, I did't find a good way for this job, so sublime's internal command navigate_to_symbol is called.

If you just don't want to jump across your files, simply turn off search_user_symbols.

garveen commented 7 years ago

Ohhh, you turned auto on, right? There is a bug when both auto and search_user_symbols is on. I'll fix it ASAP.

MalcolmK commented 7 years ago

Okay it's a bit unclear to me now. Is this fixed or not? Because you closed the issue, but your comment on the commit is unclear.

And yes, I have auto turned on.

garveen commented 7 years ago

I referenced a commit which fixed this issue let you won't jump here and there. So the mistaken-jump is fixed. Further more, point to an user-defined symbol and show its comment won't be implemented in the foreseeable future.

MalcolmK commented 7 years ago

Okay awesome!

When the upgrade be made in Package Control? I tried to upgrade this morning, but it wasn't pushed yet :)

garveen commented 7 years ago

It looks like PackageControl don't query updates oftenly, so I have no idea about this.

MalcolmK commented 7 years ago

I have removed the package and reinstalled it (version 0.1.24). But I keep having the same problem, it jumps to my function definition after 5 seconds. I have the following settings:

{
    "auto": true,
    "auto_delay": 5000,
    "language": "en",
    "language_fallback": "en",
    "languages":
    {
        "en": "gz"
    },
    "popup_max_height": 810,
    "popup_max_width": 960,
    "prompt_when_not_found": false,
    "search_user_symbols": false
}

Am I doing something wrong, or is the bug still there?

garveen commented 7 years ago

I'll reopening this issue, but I'm not working on this project before weekend. Maybe it will have fixed then.

MalcolmK commented 7 years ago

No problem at all. I'll let you know if it is fixed in the meantime, but I doubt it 'cause the latest version (0.1.24) is already on packagecontrol.io

garveen commented 7 years ago

This should be fixed now(0.1.25)

MalcolmK commented 7 years ago

Yeah it's fixed now! Thanks bro