Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request intelephense server support #409

Closed
ghost opened this issue Sep 8, 2018 · 10 comments
Closed

Request intelephense server support #409

ghost opened this issue Sep 8, 2018 · 10 comments

Comments

@ghost
Copy link

ghost commented Sep 8, 2018

I noticed the last issue was closed in January but considering intelephense is superior to the current PHP intellisense we have has anybody tried to implement this.

https://github.com/bmewburn/intelephense-server

It would be fantastic to have this in Sublime.

@rwols
Copy link
Member

rwols commented Sep 8, 2018

People seemed to have got it working in this issue: #259

@ghost
Copy link
Author

ghost commented Sep 8, 2018

Thanks @rwols i've just visited this issue but unfortunately I can't get it to work, it doesn't seem to be indexing.

@jfcherng
Copy link
Contributor

jfcherng commented Sep 8, 2018

I am using it and could confirm it's working. Here's my settings for it.

        "intelephense-ls":
        {
            // npm i -g intelephense-server
            "enabled": true,
            "command": [
                "node",
                "C:/Users/jfcherng/AppData/Roaming/npm/node_modules/intelephense-server/lib/server.js",
                "--stdio",
            ],
            "scopes": ["source.php", "embedding.php"],
            "syntaxes": ["Packages/PHP/PHP.sublime-syntax"],
            "languageId": "php",
            "initializationOptions": {
                "storagePath": "C:/Users/jfcherng/AppData/Local/Temp/intelephense-ls",
            },
        },

intelephense-server runs obviously faster than php-language-server but some latest PHP features would be linted as errors.

@ghost
Copy link
Author

ghost commented Sep 8, 2018

Now we're getting somewhere! I'm missing a lot of completions, am I missing something?

VSCode

screen shot 2018-09-08 at 16 55 48

Sublime

screen shot 2018-09-08 at 16 56 07

Thanks for your help :)

@jfcherng
Copy link
Contributor

jfcherng commented Sep 8, 2018

@carlevison Probably because files (maybe App\Http\Controllers\Controller in your example) are not indexed. If you open the parent class files, they would be index... And more completions would show.

#259 (comment)

@ghost
Copy link
Author

ghost commented Sep 8, 2018

@jfcherng Unfortunately not, I still don't get completions.

screen shot 2018-09-08 at 17 36 18

@jfcherng
Copy link
Contributor

jfcherng commented Sep 8, 2018

@carlevison I have no clue then. I have the same issue as well, to a certain degree. Sometimes it works and sometimes doesn't.

@ghost
Copy link
Author

ghost commented Sep 8, 2018

@jfcherng Thank you anyway.

Hopefully someone will work on this so it works how it does in VSCode which is entirely possible.

@tomv564
Copy link
Contributor

tomv564 commented Sep 10, 2018

One hint can be to investigate the VS Code extension for the intelephense server. Any extra logic beyond the standard messages would have to be implemented as an additional package to LSP.

We should document the configuration for sure!

@tomv564
Copy link
Contributor

tomv564 commented Oct 2, 2018

Added intelephense to the documentation.
If someone adds a "bin" field to their package.json then it can be part of the LSP default configs.
There is an issue here documenting why the server alone doesn't update/parse from disk.
https://github.com/bmewburn/intelephense-server/issues/1

@tomv564 tomv564 closed this as completed Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants