Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Autocomplete does not include arguments #67

Closed
andrews05 opened this issue Nov 1, 2017 · 15 comments
Closed

Autocomplete does not include arguments #67

andrews05 opened this issue Nov 1, 2017 · 15 comments

Comments

@andrews05
Copy link

Would be great if the autocomplete could include the function parameters when activated. Currently it completes the function name only.

@damieng damieng closed this as completed Nov 1, 2017
@damieng damieng reopened this Nov 1, 2017
@damieng
Copy link
Contributor

damieng commented Nov 1, 2017

We have the code signature stuff now available in the atom-ide-ui package and atom-languageclient, just need to see if the language server supports this. If it does it should just be adding the service to the package.json

@JasonTheAdams
Copy link

Yes! I thought at first the IDE wasn't working properly as I assumed arguments and such would be included. Seems like a necessary feature for an IDE. Hope to see this introduced in the future!

@damieng
Copy link
Contributor

damieng commented Nov 7, 2017

It turns out the underlying language server doesn't yet support signature help, it's being tracked at felixfbecker/php-language-server#18

@damieng damieng added the blocked label Nov 7, 2017
@andrews05
Copy link
Author

Thanks for investigating this. In the meantime, is it possible to disable autocomplete for ide-php? I'm trying out php-integrator's autocomplete instead but I don't want ide-php suggestions showing as well (but I don't want to disable ide-php completely either).

@pxlrbt
Copy link

pxlrbt commented Dec 11, 2017

Is there an update on this? Apparently the language server supports signature help now.

@rsese
Copy link

rsese commented Dec 11, 2017

There's a PR to update the language server at #86 if you want to subscribe @pixelarbeit.

@pxlrbt
Copy link

pxlrbt commented Dec 12, 2017

Thanks @rsese. I didn't have to. It was merged and released just after your answer.

@winstliu
Copy link

@vinkla can you confirm if this is fixed after #86?

@damieng
Copy link
Contributor

damieng commented Dec 12, 2017

Confirmed working here
image

@damieng damieng closed this as completed Dec 12, 2017
@andrews05
Copy link
Author

Thanks heaps, the signature help is great :)
Two problems I've encountered with it though:

  1. The help is always positioned above the line you're working on, which is a problem if you're at the top of the screen. IMO, it would be preferable to default to below the line and only move above if you're at the bottom of the screen.
  2. I'm seeing <p> tags in the help for built-in functions like substr.

Lastly, what I was actually hoping for originally was to show the function parameters in the autocomplete suggestions, as I've seen in php-integrator. Would this be possible?
autocomplete

@damieng
Copy link
Contributor

damieng commented Dec 13, 2017

  1. This would need to be reported on the atom-ide-ui package as that is where the underlying datatip code exists.

  2. The help should either be ascii or markdown according to the protocol specification https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#textDocument_signatureHelp The language server must be returning HTML which will need to be fixed upstream there https://github.com/felixfbecker/php-language-server

  3. I'm not sure why the language server doesn't return such data for autocomplete. It might be due to performance in which case they could add it to resolve so it shows as you move the mouse up/down the list. Either way they'll need to fix it upstream too

@andrews05
Copy link
Author

  1. Hm, I've just tried it in VS Code and the <p> tags aren't showing there. I note the spec you link to says "A client could decide to remove HTML from the markdown", implying that it's not incorrect to have HTML in the markdown. If you're sure though, I'm happy to file an issue on the language server.

  2. Tried this in VS Code as well and it appears to work exactly as you suggest, resolving only the highlighted item. So not sure that it is an issue with the language server?

@damieng
Copy link
Contributor

damieng commented Dec 14, 2017

  1. This is an on-going issue where people haven't coded to the formal written spec but have just done whatever VS Code seems to accept. That's a cat and mouse game that is time consuming to play.

  2. I'd have to check that out then and I've exceeded the time I have available for ide-php right now (this project is disproportionally time consuming compared to the other ide-x packages). Turning on debugging with atom.config.get('core.debugLSP', true) might shed light on it.

@andrews05
Copy link
Author

Okay, thanks for your help :)

@trymeouteh
Copy link

I cannot seem to get the arguements to show up when I type a function. I have installed ide-php a few days ago and I have set the PHP Path.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants