Git Product home page Git Product logo

Comments (7)

paulstatezny avatar paulstatezny commented on May 27, 2024 7

I have the same issue as @spikegrobstein, since upgrading Elixir with asdf from 1.11.* to 1.12.* (from OTP 23 to 24). But my rebar and Elixir/OTP versions aren't mismatched as far as I can tell.

Edit: I found the answer here #29, namely following these instructions: https://github.com/elixir-lsp/coc-elixir#server-fails-to-start

Install ElixirLS manually

git clone https://github.com/elixir-lsp/elixir-ls.git ~/.elixir-ls
cd ~/.elixir-ls
mix deps.get && mix compile && mix elixir_ls.release -o release

Point coc-elixir to the new installation

Open coc-settings.json:

:CocConfig

Add this line:

{
  "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh"
}

from coc-elixir.

spikegrobstein avatar spikegrobstein commented on May 27, 2024 1

I tracked down my issue to the fact that I had a newer version of elixir installed than mix local.rebar's version was installing. so it was an erlang/OTP mismatch. I switched to using asdf to manage my elixir install and installed 1.13.0 and everything works, now, for me.

from coc-elixir.

amiralies avatar amiralies commented on May 27, 2024

does the project compile in command line?

from coc-elixir.

chuygil avatar chuygil commented on May 27, 2024

does the project compile in command line?

@amiralies Im just going over the guides on the elixir website right now, so I am not necessarily working with a project, but if I run a file using elixir or elixirrc it does work.

from coc-elixir.

spikegrobstein avatar spikegrobstein commented on May 27, 2024

i've got this exact same issue. project compiles fine on CLI, but I always get the ElixirLS has crashed error.

:CocOpenLog shows this information:

2021-05-19T17:04:17.513 INFO (pid:29640) [services] - elixir state change: stopped => starting
2021-05-19T17:04:17.528 INFO (pid:29640) [plugin] - coc.nvim 0.0.80-971c5f81b4 initialized with node: v16.1.0 after 97ms
2021-05-19T17:04:17.532 INFO (pid:29640) [language-client-index] - Language server "elixir" started with 29673
2021-05-19T17:04:17.639 INFO (pid:29640) [attach] - receive notification: highlight []
2021-05-19T17:04:17.851 INFO (pid:29640) [services] - elixir state change: starting => running
2021-05-19T17:04:17.855 INFO (pid:29640) [services] - service elixir started
2021-05-19T17:04:19.603 INFO (pid:29640) [services] - elixir state change: running => stopped
2021-05-19T17:04:19.603 INFO (pid:29640) [services] - elixir state change: stopped => starting
2021-05-19T17:04:19.605 INFO (pid:29640) [language-client-index] - Language server "elixir" started with 29747
2021-05-19T17:04:19.926 INFO (pid:29640) [services] - elixir state change: starting => running
2021-05-19T17:04:21.674 INFO (pid:29640) [services] - elixir state change: running => stopped
2021-05-19T17:04:21.674 INFO (pid:29640) [services] - elixir state change: stopped => starting
2021-05-19T17:04:21.677 INFO (pid:29640) [language-client-index] - Language server "elixir" started with 29799
2021-05-19T17:04:21.996 INFO (pid:29640) [services] - elixir state change: starting => running
2021-05-19T17:04:23.741 INFO (pid:29640) [services] - elixir state change: running => stopped
2021-05-19T17:04:23.741 INFO (pid:29640) [services] - elixir state change: stopped => starting
2021-05-19T17:04:23.743 INFO (pid:29640) [language-client-index] - Language server "elixir" started with 29872
2021-05-19T17:04:24.073 INFO (pid:29640) [services] - elixir state change: starting => running
2021-05-19T17:04:25.844 INFO (pid:29640) [services] - elixir state change: running => stopped
2021-05-19T17:04:25.844 INFO (pid:29640) [services] - elixir state change: stopped => starting
2021-05-19T17:04:25.846 INFO (pid:29640) [language-client-index] - Language server "elixir" started with 29959
2021-05-19T17:04:26.195 INFO (pid:29640) [services] - elixir state change: starting => running
2021-05-19T17:04:28.755 INFO (pid:29640) [services] - elixir state change: running => stopped
2021-05-19T17:06:47.866 INFO (pid:29640) [attach] - receive notification: openLog []
2021-05-19T17:06:48.056 INFO (pid:29640) [attach] - receive notification: highlight []
2021-05-19T17:07:01.137 INFO (pid:29640) [attach] - receive notification: highlight []

I've tried mix local.rebar but to no avail. I haven't worked on an elixir project for a few months, and has been happening for the last week or so. I even upgraded elixir but it doesn't seem to help.

This is neovim: NVIM v0.5.0-dev+1282-gfbe18d9ca

from coc-elixir.

bretfunk avatar bretfunk commented on May 27, 2024

Paul's solution worked for me but I also had to mix local.rebar to fix a Could not compile dependency :forms error after recompile/update/clean didn't work for me.

from coc-elixir.

hargut avatar hargut commented on May 27, 2024

dnf install erlang-erl_interface fixed a similar compile error for me.

from coc-elixir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.