bmewburn / intelephense-docs

Documentation for the Intelephense PHP language server
https://intelephense.com
Other
180 stars 17 forks source link

maxSize not working in kate editor #41

Open iarkaroy opened 3 years ago

iarkaroy commented 3 years ago

I am trying to setup the language server with kate editor. Here is my config

{
    "servers": {
        "php": {
            "command": ["intelephense", "--stdio"],
            "rootIndicationFileNames": ["composer.json"],
            "highlightingModeRegex": "^PHP.*$",
            "settings": {
                "intelephense.files.maxSize": 3000000
            }
        }
    }
}

But the maxSize config is not applied. I am still getting warnings like file:///some/path/vendor/composer/autoload_static.php is over the maximum file size of 1000000 bytes.

I am unable to detect what I am doing wrong. Please suggest.

bmewburn commented 3 years ago

The client needs to support the workspace/configuration request. I'm unsure if Kate supports this or how it handles settings and can't find any documentation on this.

iarkaroy commented 3 years ago

I have found how lsp can be configured in kate. https://docs.kde.org/trunk5/en/kate/kate/kate-application-plugin-lspclient.html

In addition, each server entry object may also have an "initializationOptions" entry, which is passed along to the server as part of the 'initialize' method. If present, a "settings" entry is passed to the server by means of the 'workspace/didChangeConfiguration' notification.

Does it help to address the problem?

bmewburn commented 3 years ago

Does it help to address the problem?

It probably explains why it's not working for you. When workspace/didChangeConfiguration happens intelephense sends workspace/configuration . I'll put a fallback in for when workspace/configuration is not supported by the client.

Zzombiee2361 commented 2 years ago

Any update on this?

madalinignisca commented 1 year ago

Hi @bmewburn. Would you be able to tell us if the fallback is already available in recent releases or when will it be? I'd like to use Kate for php instead of vscode.