bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.6k stars 93 forks source link

Better support for Linux environments #1866

Open johnhamelink opened 3 years ago

johnhamelink commented 3 years ago

Feature description or problem with existing feature A clear and concise description of what the feature or problem is.

By default, the license file lives in ${HOME}/intelephense/, however the freedesktop standard is widely regarded as the 'correct' place for configuration such as this to live within userland.

Describe the solution you'd like A clear and concise description of what you want to happen.

In Linux and other similar operating systems, files and directories which are prefixed with a period/full-stop are considered "hidden". The Freedesktop standard takes advantage of this to provide a single configuration directory, writeable for the user, which contains configuration for userland applications. The intelephense system can support this by simply loading configurations from ${XDG_CONFIG_HOME}/intelephense/ before trying to load from ${HOME}/intelephense/ when the XDG_CONFIG_HOME environment variable has been set.

Additional context Add any other context or screenshots about the feature request here.

kedodrill commented 8 months ago

For now I have put the licence.txt file in my config dir and made a function to load it. I'm using neovim but I'm sure you can do something similar in emacs. See the gist below that I found, I just changed "license" to "licence" and HOME to XDG_CONFIG_HOME

https://gist.github.com/theoboldalex/27d5b40dce9a8ad444494b0c4d1b3ef6

Obviously this isn't a solution for the project but it atleast keeps the folder out of my home

I have also set my globalStoragePath to XDG_DATA_HOME/intelephense, which seems to have the activation details of the key.