KATE: Unable to use LSP server for PHP

Stolz stolz at gsmlandia.com
Tue Dec 17 14:36:44 GMT 2019


Hi.

I'm trying to configure the new Kate (version 19.12.0) LSP plugin to use a
server other than the ones listed in
https://invent.kde.org/kde/kate/blob/master/addons/lspclient/settings.json

Specifically I want to have LSP support for PHP language via this server
implementation: https://github.com/felixfbecker/php-language-server

I've successfully installed the PHP server and I can run it without issues
but after enabling the LSP plugin in Kate and providing my own server
config file for Kate to "discover" the new LSP server, when I open a PHP
file in Kate I see the message "No LSP server for this document" and none
of the LSP features are available. See screenshot at
https://imgur.com/a/LHDerBi

The command to run the server in my computer is "php
/home/stolz/php-language-server/bin/php-language-server.php" and therefore
I have created this custom server config JSON file:

{
  "servers": {
    "php": {
      "command": ["php",
"/home/stolz/php-language-server/bin/php-language-server.php"],
      "url": "https://github.com/felixfbecker/php-language-server"
    }
  }
}

Since the plugin is new there isn't much documentation around so I'm not
sure if I'm following the expected JSON format. Also, the server
implementation supports input from both STDIN/STDOUT or TCP. Which one does
Kate use for the client-server communication? I don't see any option to
specify server address nor port, so I guess Kate uses STDIN/STDOUT.

Any help would be much appreciated.

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20191217/6f5dfa8e/attachment.html>


More information about the KWrite-Devel mailing list