sublimelsp / LSP-intelephense

PHP support for Sublime's LSP plugin provided through intelephense.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to apply Intelephense configurations?

seanrabey opened this issue · comments

Hello,
Thanks for this plugin, it makes setting up LSP very easy!

I can't apply any intelephense configurations.
I'm looking to add the redis stub to my configuration, but I can't figure out how to make it work.
I'm using the documentation here regarding stubs:
https://github.com/bmewburn/intelephense-docs/blob/master/gettingStarted.md

And my Preferences > Package Settings > LSP > Servers > LSP-intelephense looks like this:

{
    "intelephense.stubs": {
        "type": "array",
        "items": {
            "type": "string",
            "enum": [
                "redis"
            ]
        }
    },
    "scope": "window"
}

But it doesn't work as I still get Undefined Type: 'Redis' errors on new \Redis();
Thanks very much

Put your server settings inside of a ”settings” object. Use LSP-json to get warnings about these mismatched schema structures.

Thanks for the tip, LSP-json is very cool.
I did get it working with the following config

{
    "settings": {
        "intelephense.stubs": [
            "redis"
        ]
    }
}

Thanks for the help