yaegassy/coc-psalm

support for relative path for psalm.psalmScriptPath

shadowwa opened this issue · 2 comments

I have my vim config sync between several machine, some of them have a different path for $HOME.
psalm is installed globally on each machine (ie: ~/.config/composer/vendor/bin/psalm).

When I try to configure psalm.psalmScriptPath to a relative path:

"psalm.psalmScriptPath": "$HOME/.config/composer/vendor/bin/psalm-language-server"

or

"psalm.psalmScriptPath": "~/.config/composer/vendor/bin/psalm-language-server"

I got the message

[coc.nvim] The setting psalm.psalmScriptPath must be provided (e.g. vendor/bin/psalm-language-server)

to be able to make the psalm script detective I need to use absolute path

"psalm.psalmScriptPath": "/home/user/.config/composer/vendor/bin/psalm-language-server"

which break on computer having a different $HOME, for example /homes/user/

Added support for $HOME and ~/. Update coc-psalm and give it a try.

it's working fine with this patch, thank you.