Closed andresmeireles closed 3 years ago
I think the issue is that lite-xl isn't able to access the $PATH environment variable set by your zsh setup which contains the reference to /home/andresmeireles/.asdf/shims
Running lite-xl from the zsh shell should work by giving lite-xl access to the same PATH environment variable as the shell.
(Easy solution), setting the absolute path to the lsp server on your init.lua:
lspconfig.intelephense.setup {
command = {
"/home/andresmeireles/.asdf/shims/intelephense",
"--stdio"
},
init_options = {
storagePath = "/home/andresmeireles/.cache/intelephense"
}
}
(Harder solution), you could export the asdf shims directory system wide by doing something like:
# create script executed at startup
sudo touch /etc/profile.d/global_asdf.sh
# make the script executable
sudo chmod 0755 /etc/profile.d/global_asdf.sh
Then edit that file sudo nano /etc/profile.d/global_asdf.sh
and add the following to it:
export PATH="/home/andresmeireles/.asdf/shims:$PATH"
Reboot your system and lite-xl should now be able to find the lsp servers installed on that path.
Hi, i tried both easy and hard solution, none worked for me. For now i think the only solution is remove asdf. Many thanks for reply
Strange... giving the path directly to /home/andresmeireles/.asdf/shims/intelephense
should have worked unless asdf is doing some strange stuff, also launching lite-xl directly from the zsh shell should have worked, not sure what could be causing the issue in your setup.
I did what you said more carefully and lsp worked, in fact even not doing the suggestions you said and open lite-xl direct from zsh, lsp work. Do you know why it behaves like this?
As mentioned before it seems that asdf was configured to set proper paths on your zsh setup (the shell setup for your user), but those paths are not accessible to most linux applications which call directly to sh or bash.
You can try running sh --version or sh --help to see which shell is the default system one and set for it the PATH environment variable.
thanks for the answer, i will check this later
First of all I want to say that this library is amazing and that I really want to use it. Installed normally I follow the instructions to setup the lsp, but whenever I open a file I get this message, that mine did not install the server, even with the servers installed correctly and using those in other editors.
The message
The installed server:
my config (i'm not touch anything, all is the same, except the lsp config):
i'm really a beginner on lite-xl and his plugins, and my english is poor, so sorry if this is my fault or bad config. I use asdf to manage program language verions.