marlonfan / coc-phpls

🐭 php language server for coc.nvim
MIT License
212 stars 16 forks source link

Load license key from file #51

Closed JoyceBabu closed 4 years ago

JoyceBabu commented 4 years ago

Describe the bug Can you please add an option to load the licenseKey from a file, so that coc-settings.json can be version controlled? Currently I am unable to upload my coc-settings.json to my dotfiles repository on GitHub, since it contains my license key.

marlonfan commented 4 years ago

Of course. Thanks for your feedback

yaegassy commented 4 years ago

@JoyceBabu @marlonfan

In the current version of intelephense, you can load the license key from a file.

Create the $HOME/intelephense/licence.txt file and create the If you write the license key in the file, it will be loaded automatically.

It is also possible to specify the file path explicitly.

The file is an "absolute path".

e.g:

"intelephense.licenceKey": "/Users/yaegassy/.config/intelephense/licence.txt",

See

https://github.com/bmewburn/intelephense-docs/blob/master/installation.md#initialisation-options

... snip

    //Optional licence key or absolute path to a text file containing the licence key.
    //{os.homedir()}/intelephense/licence.txt will also be checked by 
    //default if initializationOptions are not exposed by client.
    licenceKey?: string;

... snip
JoyceBabu commented 4 years ago
//Optional licence key or absolute path to a text file containing the licence key.

Thank you. I didn't know it supported file path too.