The source project of this merge request has been removed.
Draft:Add PHP LSP
Hello, I would like to submit Vimeo's Psalm as the default language server for PHP in Kate. There are a few notes, though:
- Kate currently does not start the server when I set the
highlightingModeRegex
value into^PHP$
,^Php$
,^php$
, and even^PHP (HTML)$
, hence I omitted that from theconfig.json
for PHP/Psalm. - Unlike other (especially non-PHP) language servers, Psalm is expected to be installed on the current working directory (
composer require --dev vimeo/psalm
instead ofcomposer global require vimeo/psalm
) and initialized first by generating a config file (./vendor/bin/psalm --init
). The full installation instructions for Psalm are detailed in https://github.com/vimeo/psalm/blob/master/docs/running_psalm/installation.md. - Psalm's language server has a verbose mode which is quite convenient to check for it's overall compatibility with Kate. Simply change the
command
parameter from["vendor/bin/psalm-language-server"]
to["vendor/bin/psalm-language-server", "--verbose"]
. I have done the same thing with Phpactor language server and instead found a critical bug (caused by Phpactor, not by Kate) - see https://github.com/phpactor/phpactor/issues/1304 - I'm aware that I haven't edited the docbook yet, since I'm waiting for feedback before finalizing this merge request.