coc-psalm
yaegassyPsalm extension for coc.nvim
Published Package Summary
coc-psalm
coc.nvim extension for Psalm language server.
"Psalm" started as a static analysis tool, but now it also has the features of a Language Server.
Install
:CocInstall coc-psalm
Note
Install psalm in your project.
composer require --dev vimeo/psalm
Required: The project must contain a psalm.xml or psalm.xml.dist file as a condition for starting "coc-psalm".
./vendor/bin/psalm --init
Code Actions
Example key mapping (Code Action related)
nmap <silent> ga <Plug>(coc-codeaction-line)
Usage:
In the line with diagnostic message, enter the mapped key (e.g. ga) and you will see a list of code actions that can be performed.
Code Actions (Client side):
Show issue for https://psalm.dev/xxx: Open the issue url in your browserSuppress all for this line
Code Actions (Server side):
Suppress XXX for this line
"psalm.xml" or "psalm.xml.dist" completion and linting and more...
To use it, you need to install coc-xml.
Thanks
License
MIT
This extension is built with create-coc-extension
- Psalm extension for coc.nvim
- workspaceContains:**/?(psalm.xml|psalm.xml.dist)
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for coc-psalm@0.12.4.
| Command (:CocCommand) | Description |
|---|---|
| psalm.restartPsalmServer | Restart Psalm Language server |
| psalm.analyzeWorkSpace | Analyze Workspace |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Enable coc-psalm extension"
}Raw JSON Schema
{
"type": "array",
"default": [
"psalm.xml",
"psalm.xml.dist"
],
"description": "A list of files to checkup for psalm configuration (relative to the workspace directory)"
}Raw JSON Schema
{
"enum": [
"off",
"messages",
"verbose"
],
"type": "string",
"scope": "window",
"default": "off",
"description": "Traces the communication between coc.nvim and the Psalm language server"
}Raw JSON Schema
{
"type": [
"boolean"
],
"default": false,
"description": "Enable this to print messages. (Modifying requires restart)"
}Raw JSON Schema
{
"type": [
"string",
"null"
],
"default": null,
"description": "Optional (Advanced). If provided, this overrides the Psalm server script to use, e.g. `vendor/bin/psalm-language-server`, `$HOME/path/to/psalm-language-server`, `~/path/to/psalm-language-server` (Modifying requires restart)"
}Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Disable completion only."
}Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Disable definition only."
}Raw JSON Schema
{
"type": [
"array",
"null"
],
"default": [
"-dxdebug.remote_autostart=0",
"-dxdebug.remote_enable=0",
"-dxdebug_profiler_enable=0"
],
"description": "Optional (Advanced), default is '-dxdebug.remote_autostart=0 -dxdebug.remote_enable=0 -dxdebug_profiler_enable=0'. Additional PHP executable CLI arguments to use."
}Raw JSON Schema
{
"type": [
"string",
"null"
],
"default": null,
"description": "Optional, defaults to searching for \"php\". The path to a PHP 7.0+ executable to use to execute the Psalm server. The PHP 7.0+ installation should preferably include and enable the PHP module `pcntl`. (Modifying requires restart)"
}Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Enable this to use PHP-provided ini defaults for memory and error display. (Modifying requires restart)"
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Optional (Advanced). Additional arguments to the Psalm language server. (Modifying requires restart)"
}Raw JSON Schema
{
"type": [
"array"
],
"default": [
{
"scheme": "file",
"language": "php"
},
{
"scheme": "untitled",
"language": "php"
}
],
"description": "A list of file extensions to request Psalm to analyze. By default, this only includes 'php' (Modifying requires restart)"
}Raw JSON Schema
{
"type": [
"boolean"
],
"default": false,
"description": "Enable this to enable unused variable and parameter detection"
}Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Disable ProgressOnInitialization only."
}