Skip to content

PHP (Serenata)#

Server#

For more information about the LSP server, check Serenata.

Installation#

For more instructions on how to install manually, check here.

Debugger: Yes#

Available configurations#

lsp-serenata-exclude-path-expressions#

Type: lsp-string-vector

Default: [/.+Test.php$/]

One or more expressions of paths to ignore. This uses Symfony`s Finder in the background, so this means you can configure anything here that can also be passed to the name function, which includes plain strings, globs, as well as regular expressions. Note that for existing projects, modifying these will not not automatically prune them from the index if they are already present.


lsp-serenata-file-extensions#

Type: lsp-string-vector

Default: [php]

List of file extensions (without dot) to process. Files that do not match this whitelist will be ignored during indexing. Usually you`ll want to set this to at least include php, as it is the most common PHP extension. phpt is not included by default as it is often used to contain test code that is not directly part of the code. Note that for existing projects, removing extensions will not not automatically prune files having them from the index if they are already present. Adding new ones will cause the files having them to be picked up on the next project initialization.


lsp-serenata-index-database-uri#

Type: file

Default: file:///home/runner/.emacs.d/index.sqlite

The location to store the index database. Note that, as the index database uses SQLite and WAL mode, additional files (usually two) may be generated and used in the same folder. Note also that Serenata relies on the Doctrine DBAL library as well as the SQLite backends in PHP, which may not support non-file URI`s, which may prevent you from using these.


lsp-serenata-php-version#

Type: number

Default: 7.3

Allows you to specify the PHP version your project is written in. At the moment this directive is still ignored, but it will influence functionality such as refactoring in the future, where older PHP versions may not support scalar type hints, which may then be omitted from places such as getters and setters.


lsp-serenata-server-path#

Type: file

Default: serenata.phar

Path to the Serenata Language Server phar file. It can be downloaded from https://gitlab.com/Serenata/Serenata/-/releases.


lsp-serenata-uris#

Type: lsp-string-vector

Default: []

A list of folders to index for your project. This does not have to include the root of the project itself, in case you have need of an exotic configuration where the root of the project is at some location but your actual PHP code is somewhere else. Note that if you are running Serenata in a container, you will have to ensure that these URI`s are mapped inside it. Avoid using file paths containing spaces. This is currently broken due to apparent PHP quirks. By default, the value is taken from the lsp workspace location.



Last update: October 13, 2021