elixir-tools / elixir-tools.nvim

Neovim plugin for Elixir
MIT License
417 stars 31 forks source link

ElixirRestart command not found #22

Closed joaothallis closed 2 years ago

joaothallis commented 2 years ago

I am using the master version. ElixirRestart, ElixirFromPipe... are not found. I think that it is because I have a problem during the "Install ElixirLS" step. How can I rerun the setup again? I tried to reinstall and delete .elixir_ls but it not make the "Install ElixirLS" question apear again.

mhanberg commented 2 years ago

Are you in an elixir buffer? They only get created for the buffer that the language server is attached to.

joaothallis commented 2 years ago

Yes. I am in an elixir buffer. I am having this problem to install elixirls (I am always selecting 1 and pressing ):


Install ElixirLS
1: Yes
2: No
Type number and <Enter> or click with the mouse (q or empty cancels): 1Cloning ref tags/v0.9.0 from repo elixir-lsp/elixir-ls
Error detected while processing FileType Autocommands for "elixir":
[lspconfig] cmd not defined for "elixirls". Manually set cmd in the setup {} call according to server_configurations.md, see :help lspconfig-index.
Install ElixirLS
1: Yes
2: No
Type number and <Enter> or click with the mouse (q or empty cancels): 1Cloning ref tags/v0.9.0 from repo elixir-lsp/elixir-ls
[lspconfig] cmd not defined for "elixirls". Manually set cmd in the setup {} call according to server_configurations.md, see :help lspconfig-index.
Install ElixirLS
1: Yes
2: No
Type number and <Enter> or click with the mouse (q or empty cancels):
mhanberg commented 2 years ago

Thanks for the report, I think this is an installation issue rather than a command issue.

if you are on the latest, you should be able to delete the ~/.cache/nvim/elixir.nvim/installs directory and the ./.elixir_ls/elixir.nvim (in your project directory) directories and then restart neovim. it should be able to re-install.

i thin the problem you're seeing is that it downloaded the elixir ls source code correctly, but failed when compiling. then it's trying to clone again and failing. I still need to handle logic to handle that.

joaothallis commented 2 years ago

i thin the problem you're seeing is that it downloaded the elixir ls source code correctly, but failed when compiling.

Thank you! I will try to compile elixir ls manually to checkout the problem.

I already have elixir-ls working using https://github.com/joaothallis/dotfiles/blob/master/.config/nvim/init.lua#L126 but the commands :Elixir* are not available

mhanberg commented 2 years ago

This plugin replaces starting elixir-ls with lspconfig in that way. The commands are added within this plugin.

You shouldn't be using them simultaneously