Git Product home page Git Product logo

coc-elixir's Introduction

coc-elixir

Elixir language server extension based on elixir-ls for coc.nvim.

Install

CocInstall

  1. Make sure you've got elixir and mix available in $PATH.

  2. Inside (neo)vim run this command:

:CocInstall coc-elixir

vim-plug

  1. Make sure you've got elixir, mix and yarn available in $PATH.

  2. Inside your plug#begin/end block in your .vimrc (vim) or init.vim (neovim) file, after coc.nvim add:

Plug 'elixir-lsp/coc-elixir', {'do': 'yarn install && yarn prepack'}
  1. Get the latest elixir-ls release from here and unzip it into ~/.vim/plugged/coc-elixir/els-release (unzip elixir-ls.zip -d ~/.vim/plugged/coc-elixir/els-release).

Features

  • Go to definition support
  • Code completion
  • Inline diagnostic (Build errors and warning)
  • Documentation on hover
  • Smart closing of code blocks
  • Code formatter

Dialyzer integration

Coc-elixir will automatically analyze your project with Dialyzer after each successful build. It maintains a "manifest" file in .elixir_ls/dialyzer_manifest that stores the results of the analysis.

You can control which warnings are shown using the elixirLS.dialyzerWarnOpts setting in coc-setting.json, found at ~/.config/nvim/coc-settings.json, or use command :CocConfig to open configuration file. You can find available options in Erlang docs at section "Warning options".

To disable Dialyzer completely add setting:

{
  "elixirLS.dialyzerEnabled": false
}

You can also set the module attribute @dialyzer to show or hide warnings at a module or function level.

Mix environment and target settings

You can control the settings that ElixirLS uses for Mix environment and target using either the user coc-settings.json or a workspace configuration.

To change the Mix environment and target, add the settings:

{
  "elixirLS.mixEnv": "dev",
  "elixirLS.mixTarget": "test"
}

Troubleshooting

Server fails to start

Upon upgrading coc-elixir it is possible that the binary files were compiled using an OTP or Elixir version that differ from the ones you have installed. When this happens, the language server will fail to start.

You can build ElixirLS yourself to solve this:

Start by building a binary of ElixirLS from its source:

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

Afterwards, create or update your coc-settings file and add this line:

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

To open your coc-settings file directly from Vim or Nvim, you can use this command:

:CocConfig

Doing these steps should make this plugin work with CoC.

coc-elixir is installed correctly but doesn't work

Make sure filetype is set to elixir, or install vim-elixir which sets up file extension associations and syntax highlighting.

License

MIT

coc-elixir's People

Contributors

aenglisc avatar amiralies avatar darwintantuco avatar dbernheisel avatar dependabot[bot] avatar jc00ke avatar jherdman avatar kamnxt avatar kjssad avatar onixus74 avatar serenityik avatar tdtadeu avatar terenceponce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

coc-elixir's Issues

" ... "mix compile" failed" in coc workspace output

I installed both coc.nvim and coc-elixir via vim-plug.

Go-to-definition only works for functions in the same module/file. For 'remote' functions, I see [coc.nvim] definition not found in the message bar.

When I run :CocCommand workspace.showOutput elixir I see the compilation errors.

Now here's the tricky part โ€“ the compilation error is a known issue (for my project)! One of my project's Mix dependencies has to be compiled first (when performing a full/clean mix compile). Is there some way to configure coc-elixir to do that?

In a shell in my project's root directory, I was able to run MIX_ENV=text mix compile and it was successful (because the relevant dependency was already compiled) so I'm guessing coc-elixir is not running mix compile exactly the same way as I am from my shell.

Error to start when version of projects are different

Hi.

I'm getting the error The elixir server crashed 5 times in last 3 minutes. The server will not be restarted. every time I open a project with different versions of the Elixir and Erlang that I compiled my ElixirLS.

I compiled my ElixirLS using Erlang 23.0.4 and Elixir 1.10.4-otp-23 and when I open NeoVim with an project using older version of like Erlang 22 and/or Elixir 1.7 the error of elixir crashed is returned.

For my projects with Erlang 23.0.4 and Elixir 1.10.4-otp-23 works great.

How could I build the ElixirLS be working with all versions?

Server fails to start

I keep getting the following error,
"[coc.nvim] The "elixir" server crashed 5 times in the last 3 minutes. The server will not be restarted."

VERSION:
Erlang/OTP 23 [erts-11.1.7] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Elixir 1.11.2 (compiled with Erlang/OTP 23)

I made sure mix and elixir when in $PATH

I tried to troubleshoot by following the server fails to start section, but was unable to build successfully, getting the following error when compiling.

* Getting elixir_sense (https://github.com/elixir-lsp/elixir_sense.git)
remote: Enumerating objects: 291, done.        
remote: Counting objects: 100% (291/291), done.        
remote: Compressing objects: 100% (160/160), done.        
remote: Total 7193 (delta 151), reused 219 (delta 115), pack-reused 6902        
* Getting erl2ex (https://github.com/dazuma/erl2ex.git)
remote: Enumerating objects: 1431, done.        
remote: Total 1431 (delta 0), reused 0 (delta 0), pack-reused 1431        
* Getting jason_vendored (https://github.com/elixir-lsp/jason.git - origin/vendored)
remote: Enumerating objects: 44, done.        
remote: Counting objects: 100% (44/44), done.        
remote: Compressing objects: 100% (38/38), done.        
remote: Total 1278 (delta 9), reused 17 (delta 6), pack-reused 1234        
* Getting mix_task_archive_deps (https://github.com/JakeBecker/mix_task_archive_deps.git)
remote: Enumerating objects: 212, done.        
remote: Total 212 (delta 0), reused 0 (delta 0), pack-reused 212        
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  dialyxir 1.0.0
  docsh 0.7.2
  erlex 0.2.6
  forms 0.0.1
  getopt 1.0.1
  providers 1.8.1
  stream_data 0.5.0
* Getting forms (Hex package)
* Getting dialyxir (Hex package)
* Getting stream_data (Hex package)
* Getting erlex (Hex package)
* Getting docsh (Hex package)
* Getting providers (Hex package)
* Getting getopt (Hex package)
===> Fetching rebar3_hex v6.10.2
===> Version cached at /home/chuy/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.10.2.tar is up to date, reusing it
===> Fetching hex_core v0.7.1
===> Version cached at /home/chuy/.cache/rebar3/hex/hexpm/packages/hex_core-0.7.1.tar is up to date, reusing it
===> Fetching verl v1.0.2
===> Version cached at /home/chuy/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar is up to date, reusing it
===> Compiling verl
===> Compiling hex_core
===> erl_interface is missing. ERLANG_LIB_DIR_erl_interface and ERLANG_LIB_VER_erl_interface will not be added to the environment.
===> erl_interface is missing. ERLANG_LIB_DIR_erl_interface and ERLANG_LIB_VER_erl_interface will not be added to the environment.
===> erl_interface is missing. ERLANG_LIB_DIR_erl_interface and ERLANG_LIB_VER_erl_interface will not be added to the environment.
===> Compiling rebar3_hex
===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3.
===> Compiling forms
==> erl2ex
Compiling 22 files (.ex)
warning: :epp_dodger.parse/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :epp_dodger]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/parse.ex:207: Erl2ex.Pipeline.Parse.parse_ext_forms/2

warning: :erl_comment_scan.string/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_comment_scan]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/parse.ex:202: Erl2ex.Pipeline.Parse.parse_ext_forms/2

warning: :erl_syntax.arity_qualifier_argument/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/erl_syntax.ex:115: Erl2ex.Pipeline.ErlSyntax.on_arity_qualifier_list/3

warning: :erl_syntax.arity_qualifier_body/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/erl_syntax.ex:114: Erl2ex.Pipeline.ErlSyntax.on_arity_qualifier_list/3

warning: :erl_syntax.atom_value/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/erl_syntax.ex:55: Erl2ex.Pipeline.ErlSyntax.on_atom/3

warning: :erl_syntax.attribute_arguments/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/erl_syntax.ex:158: Erl2ex.Pipeline.ErlSyntax.on_attribute/3

warning: :erl_syntax.attribute_name/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/erl_syntax.ex:157: Erl2ex.Pipeline.ErlSyntax.on_attribute/3

warning: :erl_syntax.comment/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

Found at 2 locations:
  lib/erl2ex/pipeline/inline_includes.ex:66: Erl2ex.Pipeline.InlineIncludes.do_include/5
  lib/erl2ex/pipeline/inline_includes.ex:67: Erl2ex.Pipeline.InlineIncludes.do_include/5

warning: :erl_syntax.comment_text/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/convert/ext_forms.ex:17: Erl2ex.Convert.ExtForms.conv_form/3

warning: :erl_syntax.function_arity/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/analyze.ex:148: Erl2ex.Pipeline.Analyze.handle_form_for_funcs/2

warning: :erl_syntax.function_name/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/analyze.ex:149: Erl2ex.Pipeline.Analyze.handle_form_for_funcs/2

warning: :erl_syntax.integer_value/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/erl_syntax.ex:79: Erl2ex.Pipeline.ErlSyntax.on_integer/3

warning: :erl_syntax.is_list_skeleton/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/erl_syntax.ex:30: Erl2ex.Pipeline.ErlSyntax.on_list_skeleton/3

warning: :erl_syntax.list_elements/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/erl_syntax.ex:31: Erl2ex.Pipeline.ErlSyntax.on_list_skeleton/3

warning: :erl_syntax.string_value/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/erl_syntax.ex:89: Erl2ex.Pipeline.ErlSyntax.on_string/3

warning: :erl_syntax.tuple_elements/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/erl_syntax.ex:100: Erl2ex.Pipeline.ErlSyntax.on_tuple/3

warning: :erl_syntax.tuple_size/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

  lib/erl2ex/pipeline/erl_syntax.ex:100: Erl2ex.Pipeline.ErlSyntax.on_tuple/3

warning: :erl_syntax.type/1 defined in application :syntax_tools is used by the current application but the current application does not directly depend on :syntax_tools. To fix this, you must do one of:

  1. If :syntax_tools is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :syntax_tools is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :syntax_tools, you may optionally skip this warning by adding [xref: [exclude: :erl_syntax]] to your "def project" in mix.exs

Found at 3 locations:
  lib/erl2ex/pipeline/convert.ex:60: Erl2ex.Pipeline.Convert.conv_form/2
  lib/erl2ex/pipeline/erl_syntax.ex:42: Erl2ex.Pipeline.ErlSyntax.on_type/4
  lib/erl2ex/pipeline/erl_syntax.ex:156: Erl2ex.Pipeline.ErlSyntax.on_attribute/3

Generated erl2ex app
==> erlex
Compiling 1 file (.yrl)
src/parser.yrl: Warning: conflicts: 27 shift/reduce, 0 reduce/reduce
Compiling 1 file (.xrl)
Compiling 2 files (.erl)
Compiling 1 file (.ex)
Generated erlex app
==> dialyxir
Compiling 59 files (.ex)
warning: :erl_types.t_is_opaque/1 defined in application :hipe is used by the current application but the current application does not directly depend on :hipe. To fix this, you must do one of:

  1. If :hipe is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :hipe is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :hipe, you may optionally skip this warning by adding [xref: [exclude: :erl_types]] to your "def project" in mix.exs

Found at 2 locations:
  lib/dialyxir/warnings/call_with_opaque.ex:36: Dialyxir.Warnings.CallWithOpaque.form_expected/1
  lib/dialyxir/warnings/call_without_opaque.ex:60: Dialyxir.Warnings.CallWithoutOpaque.form_expected_witho
ut_opaque/1

warning: :erl_types.t_to_string/1 defined in application :hipe is used by the current application but the current application does not directly depend on :hipe. To fix this, you must do one of:

  1. If :hipe is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :hipe is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :hipe, you may optionally skip this warning by adding [xref: [exclude: :erl_types]] to your "def project" in mix.exs

  lib/dialyxir/warnings/call_with_opaque.ex:34: Dialyxir.Warnings.CallWithOpaque.form_expected/1

warning: :dialyzer.run/1 is undefined (module :dialyzer is not available or is yet to be defined)
  lib/dialyxir/dialyzer.ex:47: Dialyxir.Dialyzer.Runner.run/2

warning: :dialyzer.format_warning/2 is undefined (module :dialyzer is not available or is yet to be defined)
  lib/dialyxir/formatter.ex:61: Dialyxir.Formatter.format_warning/2

warning: :dialyzer.plt_info/1 is undefined (module :dialyzer is not available or is yet to be defined)
  lib/dialyxir/plt.ex:228: Dialyxir.Plt.plt_info/1

warning: :dialyzer.run/1 is undefined (module :dialyzer is not available or is yet to be defined)
  lib/dialyxir/plt.ex:219: Dialyxir.Plt.plt_run/1

warning: Mix.Project.compile/1 is deprecated. Use Mix.Task.run("compile", args) instead
  lib/dialyxir/project.ex:47: Dialyxir.Project.cons_apps/0

warning: Mix.Project.compile/1 is deprecated. Use Mix.Task.run("compile", args) instead
  lib/mix/tasks/dialyzer.ex:164: Mix.Tasks.Dialyzer.run/1

Generated dialyxir app
==> mix_task_archive_deps
Compiling 5 files (.ex)
Generated mix_task_archive_deps app
==> jason_vendored
Compiling 8 files (.ex)
Generated jason_vendored app
===> Compiling getopt
===> Compiling providers
===> Compiling docsh
===> Compiling src/docsh_edoc_xmerl_flat.erl failed
src/docsh_edoc_xmerl_flat.erl:10: can't find include lib "xmerl/include/xmerl.hrl"; Make sure xmerl is in your app file's 'applications' list

** (Mix) Could not compile dependency :docsh, "/home/chuy/.mix/rebar3 bare compile --paths /home/chuy/.elixir-ls/_build/shared/lib/*/ebin" command failed. You can recompile this dependency with "mix deps.compile docsh", update it with "mix deps.update docsh" or clean it with "mix deps.clean docsh"```

coc-elixir does not work on Windows

On Windows platform the plugin generates output quoted below. As I see, the plugin is looking for language_server.sh instead of language_server.bat file.

## versions

vim version: NVIM v0.3.8
node version: v10.16.3
coc.nvim version: 0.0.74-c97d41aa1e
term: undefined
platform: win32

## Messages
[coc.nvim] Server elixir failed to start: Command "C:\Users\astavonin\AppData\Local\coc\extensions\node_modules\coc-elixir\els-release\language_server.sh" of elixir is not executable: Error: not found: C:\Users\astavonin\AppData\Local\coc\extensions\node_modules\coc-elixir\els-release\language_server.sh
## Output channel: elixir

[Error  - 8:42:09 AM] Starting client failed: 
Error: Command "C:\Users\astavonin\AppData\Local\coc\extensions\node_modules\coc-elixir\els-release\language_server.sh" of elixir is not executable: Error: not found: C:\Users\astavonin\AppData\Local\coc\extensions\node_modules\coc-elixir\els-release\language_server.sh
    at LanguageClient.createMessageTransports (C:\Users\astavonin\AppData\Local\nvim\plugged\coc.nvim\build\index.js:76455:23)

## Output channel: languageserver.elixir

Started ElixirLS
Elixir version: "1.9.1 (compiled with Erlang/OTP 20)"
Erlang version: "22"

08:42:15.141 [warn]  Did not receive workspace/didChangeConfiguration notification after 5 seconds. Using default settings.
Compiling with Mix env test
[Info  - 8:42:15 AM] Compile took 78 milliseconds```

Installation Instructions

I followed what was there... from inside Vim, I ran

:CocInstall coc-elixir

I got:

E492: Not an editor command: CocInstall coc-elixir

Is there something more that could be included in the docs?

Upgrade to v0.6.x

I read there's a new version 0.6.x of the elixir language server, but when I CocUpgrade it still uses an older version; 0.5.2.

Add end after opening do block

There is a plugin that already does it tpope/vim-endwise but it is buggy and has conflicts withcoc-elixir. It would be really nice if coc-elixir could support this natively.

Also really great and awesome plugin. Works everywhere else like a charm ๐Ÿ‘

Umbrella project: error in compilation

Problem

Umbrella app with compilation error
Project structure:

my_project
โ”œโ”€โ”€ apps
โ”‚ย ย  โ”œโ”€โ”€ my_in_umbrella_project
... ...
โ”œโ”€โ”€ mix.exs
...

Desired behaviour

Show compilation error in file

Actual behaviour

In /mix.exs :
[ElixirLS] [E] Build failed for unknown reason. See output log.

CocInfo output

## Output channel: elixir

Started ElixirLS Fork v0.3.0
Elixir version: "1.10.2 (compiled with Erlang/OTP 21)"
Erlang version: "22"
Compiling with Mix env test

== Compilation error in file lib/my_in_umbrella_project/file.ex ==
** (CompileError)  Some compilation error
    lib/my_in_umbrella_project/file.ex: (module)
    (stdlib 3.12.1) erl_eval.erl:680: :erl_eval.do_apply/6

Server fails to start

Language server keeps shutting itself down. Appears to be related to coc-elixir cause all the other extensions which I have installed for coc seem to work just fine.

I have also tested with just coc-elixir installed by itself to ensure not conflicts.

coc-elixir

Vim version: 8.1.1244
OS: Linux Debian 9 (Stretch)
Elixir version: 1.9.0 and also tried 1.8.2

Error: spawn .../language_server.sh ENOENT

I upgraded to Elixir 1.12 via asdf, and erlang 24. The LS stopped working. I came here and found the manual solution. I tried it. It started failing for a different reason. I rolled back in ~/.elixir-ls/... to the asdf lang versions you recommend in the manual solution file .release-tool-versions. I copied it directly to a local .tool-versions and installed them via asdf. It still didn't work. Here is the output from :CocOpenLog. The error was the same no matter the lang versions I used:

2021-05-26T15:27:48.782 INFO (pid:19446) [services] - registered service "elixir"
2021-05-26T15:27:48.784 INFO (pid:19446) [services] - elixir state change: stopped => starting
2021-05-26T15:27:48.868 WARN (pid:19446) [attach] - Plugin not ready when received "highlight" []
2021-05-26T15:27:48.894 INFO (pid:19446) [plugin] - coc.nvim 0.0.80-998c7d8034 initialized with node: v15.10.0 after 163ms
2021-05-26T15:27:48.899 INFO (pid:19446) [services] - elixir state change: starting => stopped
2021-05-26T15:27:48.912 ERROR (pid:19446) [services] - Server elixir failed to start: Launching server "elixir" using command ~/.elixir_ls/release/language_server.sh failed.
2021-05-26T15:27:48.914 ERROR (pid:19446) [language-client-index] - Error: spawn /Users/[my comp's name]/.elixir_ls/release/language_server.sh ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:81:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /Users/austingatlin/.elixir_ls/release/language_server.sh',
  path: '/Users/austingatlin/.elixir_ls/release/language_server.sh',
  spawnargs: []
}

I've never personally used the spawn command, so I'm pretty lost as to what's wrong here, and can't debug myself. I'm on zsh and there is no spawn executable in my path.

For additional context, when I reset (so, deleted ~/.elixir-ls, wiped my local /.elixir-ls/ in my codebase) and opened VSCode, it worked just fine. It created the local /.elixir-ls and also showed some warnings, etc. Then when I opened it in vim, it errored out again in the original way, with :CocOpenLog giving no real debug info...

2021-05-26T15:56:11.015 INFO (pid:32900) [services] - registered service "elixir"
2021-05-26T15:56:11.017 INFO (pid:32900) [services] - elixir state change: stopped => starting
2021-05-26T15:56:11.100 WARN (pid:32900) [attach] - Plugin not ready when received "highlight" []
2021-05-26T15:56:11.124 INFO (pid:32900) [plugin] - coc.nvim 0.0.80-998c7d8034 initialized with node: v15.10.0 after 160ms
2021-05-26T15:56:11.128 INFO (pid:32900) [language-client-index] - Language server "elixir" started with 33078
2021-05-26T15:56:12.431 INFO (pid:32900) [services] - elixir state change: starting => running
2021-05-26T15:56:12.437 INFO (pid:32900) [services] - service elixir started
2021-05-26T15:56:15.712 INFO (pid:32900) [services] - elixir state change: running => stopped
2021-05-26T15:56:15.712 INFO (pid:32900) [services] - elixir state change: stopped => starting
2021-05-26T15:56:15.717 INFO (pid:32900) [language-client-index] - Language server "elixir" started with 33500
2021-05-26T15:56:16.697 INFO (pid:32900) [services] - elixir state change: starting => running
2021-05-26T15:56:19.993 INFO (pid:32900) [services] - elixir state change: running => stopped
2021-05-26T15:56:19.993 INFO (pid:32900) [services] - elixir state change: stopped => starting
2021-05-26T15:56:19.997 INFO (pid:32900) [language-client-index] - Language server "elixir" started with 33921
2021-05-26T15:56:20.989 INFO (pid:32900) [services] - elixir state change: starting => running
2021-05-26T15:56:24.316 INFO (pid:32900) [services] - elixir state change: running => stopped
2021-05-26T15:56:24.317 INFO (pid:32900) [services] - elixir state change: stopped => starting
2021-05-26T15:56:24.320 INFO (pid:32900) [language-client-index] - Language server "elixir" started with 34343
2021-05-26T15:56:25.304 INFO (pid:32900) [services] - elixir state change: starting => running
2021-05-26T15:56:28.603 INFO (pid:32900) [services] - elixir state change: running => stopped
2021-05-26T15:56:28.603 INFO (pid:32900) [services] - elixir state change: stopped => starting
2021-05-26T15:56:28.606 INFO (pid:32900) [language-client-index] - Language server "elixir" started with 34764
2021-05-26T15:56:29.576 INFO (pid:32900) [services] - elixir state change: starting => running
2021-05-26T15:56:32.858 INFO (pid:32900) [services] - elixir state change: running => stopped
2021-05-26T15:56:37.010 INFO (pid:32900) [attach] - receive notification: openLog []

And with :CocCommand workspace.showOutput giving the following multiple times before choosing not to attempt another restart (I'm omitting seemingly repeated stack traces):

Started ElixirLS v0.6.4
Elixir version: "1.12.0 (compiled with Erlang/OTP 24)"
Erlang version: "24"
ElixirLS compiled with Elixir 1.11.0 and erlang 23
MIX_ENV: test
MIX_TARGET: host
[Info  - 3:56:13 pm] Compile took 400 milliseconds
[Info  - 3:56:13 pm] [ElixirLS Dialyzer] Checking for stale beam files
[Info  - 3:56:13 pm] [ElixirLS WorkspaceSymbols] Indexing...
[Info  - 3:56:13 pm] [ElixirLS Dialyzer] Found 8 changed files in 22 milliseconds
[Info  - 3:56:14 pm] [ElixirLS Dialyzer] Analyzing 8 modules: [Collectable, Enumerable, Exgames, Exgames.Number, IEx.Info, Inspect, List.Chars, String.Chars]
[Info  - 3:56:14 pm] [ElixirLS WorkspaceSymbols] Module discovery complete
[Info  - 3:56:14 pm] [ElixirLS WorkspaceSymbols] 157 modules added to index

15:56:14.302 [error] Task #PID<0.223.0> started from #PID<0.180.0> terminating
** (ArithmeticError) bad argument in arithmetic expression
    (language_server 0.6.4) lib/language_server/providers/workspace_symbols.ex:519: ElixirLS.LanguageServer.Providers.WorkspaceSymbols.build_range/1
    (language_server 0.6.4) lib/language_server/providers/workspace_symbols.ex:487: ElixirLS.LanguageServer.Providers.WorkspaceSymbols.build_result/4
    (language_server 0.6.4) lib/language_server/providers/workspace_symbols.ex:397: anonymous fn/4 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.index/1
    (elixir 1.12.0) lib/enum.ex:2356: Enum."-reduce/3-lists^foldl/2-0-"/3
    (language_server 0.6.4) lib/language_server/providers/workspace_symbols.ex:386: anonymous fn/1 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.index/1
    (elixir 1.12.0) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
    (elixir 1.12.0) lib/task/supervised.ex:35: Task.Supervised.reply/5
    (stdlib 3.15) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Function: #Function<32.57814553/0 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.do_process_chunked/2>
    Args: []

15:56:14.448 [error] Task #PID<0.217.0> started from #PID<0.180.0> terminating
** (ArithmeticError) bad argument in arithmetic expression
    (language_server 0.6.4) lib/language_server/providers/workspace_symbols.ex:519: ElixirLS.LanguageServer.Providers.WorkspaceSymbols.build_range/1
    (language_server 0.6.4) lib/language_server/providers/workspace_symbols.ex:487: ElixirLS.LanguageServer.Providers.WorkspaceSymbols.build_result/4
    (language_server 0.6.4) lib/language_server/providers/workspace_symbols.ex:397: anonymous fn/4 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.index/1
    (elixir 1.12.0) lib/enum.ex:2356: Enum."-reduce/3-lists^foldl/2-0-"/3
    (language_server 0.6.4) lib/language_server/providers/workspace_symbols.ex:386: anonymous fn/1 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.index/1
    (elixir 1.12.0) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
    (elixir 1.12.0) lib/task/supervised.ex:35: Task.Supervised.reply/5
    (stdlib 3.15) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Function: #Function<32.57814553/0 in ElixirLS.LanguageServer.Providers.WorkspaceSymbols.do_process_chunked/2>
    Args: []
[Error  - 3:56:15 pm] /Users/austingatlin/.config/coc/extensions/node_modules/coc-elixir/els-release/language_server.sh exited with code: 1
[Info  - 3:56:15 pm] Connection to server got closed. Server will restart.

Please help, everything works except autocompletion

I've checked and autocompletion works correctly with other languages. In elixir, I am able to have buffer completion, but not LS completion while other features like goto definition and documentation work correctly. There's nothing special in coc log too

Fails to lint/run diagnostics on larger projects

I've got the following plugins installed:

Plug 'elixir-editors/vim-elixir'
Plug 'elixir-lsp/coc-elixir', {'do': 'yarn install && yarn prepack'}

I also have the following code in two reps -- one is a small app I made with mix, the other has many many files (over 2k .ex$ files, plus js).

  def foo(a) do
    5
  end

The smaller project will show the unused parameter warning, while the larger one does not. Goto def, formatting, docs, etc, all work -- but it looks like diagnostics may not be working. How do I troubleshoot this?

Node: 12.6.3
NVIM: 0.5.0
Latest for all plugins, as of today.
No warnings in chechealth: provider

elixir-ls fails to start

Whether I use the built-in version of elixir-ls or I build it on my own, the :CocInfo after opening an .exs or .ex file shows the following:

## versions

vim version: NVIM v0.4.3
node version: v13.7.0
coc.nvim version: 0.0.78-3478962539
coc.nvim directory: /home/justinian/.local/share/nvim/plugged/coc.nvim
term: xterm-256color
platform: linux

## Output channel: elixir


15:10:52.292 [info]  Application elixir_ls_utils exited: :stopped
Started ElixirLS v0.4.0

15:10:52.292 [info]  Application erl2ex exited: :stopped

15:10:52.292 [info]  Application forms exited: :stopped
Elixir version: "1.10.3 (compiled with Erlang/OTP 21)"
Erlang version: "23"
[Warn  - 3:10:52 PM] ** (exit) exited in: GenServer.call(ElixirLS.LanguageServer.JsonRpc, {:packet, %{"id" => 0, "jsonrpc" => "2.0", "method" => "initialize", "params" => %{"capabilities" => %{"textDocument" => %{"codeAction" => %{"codeActionLiteralSupport" => %{"codeActionKind" => %{"valueSet" => ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"]}}, "dynamicRegistration" => true, "isPreferredSupport" => true}, "codeLens" => %{"dynamicRegistration" => true}, "colorProvider" => %{"dynamicRegistration" => true}, "completion" => %{"completionItem" => %{"commitCharactersSupport" => true, "deprecatedSupport" => true, "documentationFormat" => ["markdown", "plaintext"], "preselectSupport" => true, "snippetSupport" => true}, "completionItemKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}, "contextSupport" => true, "dynamicRegistration" => true}, "declaration" => %{"dynamicRegistration" => true}, "definition" => %{"dynamicRegistration" => true}, "documentHighlight" => %{"dynamicRegistration" => true}, "documentLink" => %{"dynamicRegistration" => true, "tooltipSupport" => true}, "documentSymbol" => %{"dynamicRegistration" => true, "hierarchicalDocumentSymbolSupport" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "foldingRange" => %{"dynamicRegistration" => true, "lineFoldingOnly" => true, "rangeLimit" => 5000}, "formatting" => %{"dynamicRegistration" => true}, "hover" => %{"contentFormat" => ["markdown", "plaintext"], "dynamicRegistration" => true}, "implementation" => %{"dynamicRegistration" => true}, "onTypeFormatting" => %{"dynamicRegistration" => true}, "publishDiagnostics" => %{"relatedInformation" => true, "tagSupport" => %{"valueSet" => [1, 2]}, "versionSupport" => false}, "rangeFormatting" => %{"dynamicRegistration" => true}, "references" => %{"dynamicRegistration" => true}, "rename" => %{"dynamicRegistration" => true, "prepareSupport" => true}, "selectionRange" => %{"dynamicRegistration" => true}, "signatureHelp" => %{"dynamicRegistration" => true, "signatureInformation" => %{"documentationFormat" => ["markdown", "plaintext"], "parameterInformation" => %{"labelOffsetSupport" => true}}}, "synchronization" => %{"didSave" => true, "dynamicRegistration" => true, "willSave" => true, "willSaveWaitUntil" => true}, "typeDefinition" => %{"dynamicRegistration" => true}}, "window" => %{"workDoneProgress" => true}, "workspace" => %{"applyEdit" => true, "configuration" => true, "didChangeConfiguration" => %{"dynamicRegistration" => true}, "didChangeWatchedFiles" => %{"dynamicRegistration" => true}, "executeCommand" => %{"dynamicRegistration" => true}, "symbol" => %{"dynamicRegistration" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "workspaceEdit" => %{"documentChanges" => true, "failureHandling" => "textOnlyTransactional", "resourceOperations" => ["create", "rename", "delete"]}, "workspaceFolders" => true}}, "clientInfo" => %{"name" => "coc.nvim", "version" => "0.0.78"}, "processId" => 32234, "rootPath" => "/home/justinian/elixir/pragprog", "rootUri" => "file:///home/justinian/elixir/pragprog", "trace" => "off", "workspaceFolders" => [%{"name" => "pragprog", "uri" => "file:///home/justinian/elixir/pragprog"}]}}}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.10.3) lib/gen_server.ex:1013: GenServer.call/3
    (elixir 1.10.3) lib/stream.ex:441: anonymous fn/4 in Stream.each/2
    (elixir 1.10.3) lib/stream.ex:1449: Stream.do_element_resource/6
    (elixir 1.10.3) lib/stream.ex:1609: Enumerable.Stream.do_each/4
    (elixir 1.10.3) lib/stream.ex:649: Stream.run/1
    (stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6
[Error  - 3:10:52 PM] ~/git/elixir-ls/release/language_server.sh exited with code: 1
[Info  - 3:10:52 PM] Connection to server got closed. Server will restart.

15:10:52.489 [info]  Application elixir_ls_utils exited: :stopped
Started ElixirLS v0.4.0

15:10:52.490 [info]  Application erl2ex exited: :stopped

15:10:52.490 [info]  Application forms exited: :stopped
Elixir version: "1.10.3 (compiled with Erlang/OTP 21)"
Erlang version: "23"
[Warn  - 3:10:52 PM] ** (exit) exited in: GenServer.call(ElixirLS.LanguageServer.JsonRpc, {:packet, %{"id" => 0, "jsonrpc" => "2.0", "method" => "initialize", "params" => %{"capabilities" => %{"textDocument" => %{"codeAction" => %{"codeActionLiteralSupport" => %{"codeActionKind" => %{"valueSet" => ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"]}}, "dynamicRegistration" => true, "isPreferredSupport" => true}, "codeLens" => %{"dynamicRegistration" => true}, "colorProvider" => %{"dynamicRegistration" => true}, "completion" => %{"completionItem" => %{"commitCharactersSupport" => true, "deprecatedSupport" => true, "documentationFormat" => ["markdown", "plaintext"], "preselectSupport" => true, "snippetSupport" => true}, "completionItemKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}, "contextSupport" => true, "dynamicRegistration" => true}, "declaration" => %{"dynamicRegistration" => true}, "definition" => %{"dynamicRegistration" => true}, "documentHighlight" => %{"dynamicRegistration" => true}, "documentLink" => %{"dynamicRegistration" => true, "tooltipSupport" => true}, "documentSymbol" => %{"dynamicRegistration" => true, "hierarchicalDocumentSymbolSupport" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "foldingRange" => %{"dynamicRegistration" => true, "lineFoldingOnly" => true, "rangeLimit" => 5000}, "formatting" => %{"dynamicRegistration" => true}, "hover" => %{"contentFormat" => ["markdown", "plaintext"], "dynamicRegistration" => true}, "implementation" => %{"dynamicRegistration" => true}, "onTypeFormatting" => %{"dynamicRegistration" => true}, "publishDiagnostics" => %{"relatedInformation" => true, "tagSupport" => %{"valueSet" => [1, 2]}, "versionSupport" => false}, "rangeFormatting" => %{"dynamicRegistration" => true}, "references" => %{"dynamicRegistration" => true}, "rename" => %{"dynamicRegistration" => true, "prepareSupport" => true}, "selectionRange" => %{"dynamicRegistration" => true}, "signatureHelp" => %{"dynamicRegistration" => true, "signatureInformation" => %{"documentationFormat" => ["markdown", "plaintext"], "parameterInformation" => %{"labelOffsetSupport" => true}}}, "synchronization" => %{"didSave" => true, "dynamicRegistration" => true, "willSave" => true, "willSaveWaitUntil" => true}, "typeDefinition" => %{"dynamicRegistration" => true}}, "window" => %{"workDoneProgress" => true}, "workspace" => %{"applyEdit" => true, "configuration" => true, "didChangeConfiguration" => %{"dynamicRegistration" => true}, "didChangeWatchedFiles" => %{"dynamicRegistration" => true}, "executeCommand" => %{"dynamicRegistration" => true}, "symbol" => %{"dynamicRegistration" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "workspaceEdit" => %{"documentChanges" => true, "failureHandling" => "textOnlyTransactional", "resourceOperations" => ["create", "rename", "delete"]}, "workspaceFolders" => true}}, "clientInfo" => %{"name" => "coc.nvim", "version" => "0.0.78"}, "processId" => 32234, "rootPath" => "/home/justinian/elixir/pragprog", "rootUri" => "file:///home/justinian/elixir/pragprog", "trace" => "off", "workspaceFolders" => [%{"name" => "pragprog", "uri" => "file:///home/justinian/elixir/pragprog"}]}}}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.10.3) lib/gen_server.ex:1013: GenServer.call/3
    (elixir 1.10.3) lib/stream.ex:441: anonymous fn/4 in Stream.each/2
    (elixir 1.10.3) lib/stream.ex:1449: Stream.do_element_resource/6
    (elixir 1.10.3) lib/stream.ex:1609: Enumerable.Stream.do_each/4
    (elixir 1.10.3) lib/stream.ex:649: Stream.run/1
    (stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6
[Error  - 3:10:52 PM] ~/git/elixir-ls/release/language_server.sh exited with code: 1
[Info  - 3:10:52 PM] Connection to server got closed. Server will restart.

15:10:52.687 [info]  Application elixir_ls_utils exited: :stopped
Started ElixirLS v0.4.0

15:10:52.688 [info]  Application erl2ex exited: :stopped

15:10:52.688 [info]  Application forms exited: :stopped
Elixir version: "1.10.3 (compiled with Erlang/OTP 21)"
Erlang version: "23"
[Warn  - 3:10:52 PM] ** (exit) exited in: GenServer.call(ElixirLS.LanguageServer.JsonRpc, {:packet, %{"id" => 0, "jsonrpc" => "2.0", "method" => "initialize", "params" => %{"capabilities" => %{"textDocument" => %{"codeAction" => %{"codeActionLiteralSupport" => %{"codeActionKind" => %{"valueSet" => ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"]}}, "dynamicRegistration" => true, "isPreferredSupport" => true}, "codeLens" => %{"dynamicRegistration" => true}, "colorProvider" => %{"dynamicRegistration" => true}, "completion" => %{"completionItem" => %{"commitCharactersSupport" => true, "deprecatedSupport" => true, "documentationFormat" => ["markdown", "plaintext"], "preselectSupport" => true, "snippetSupport" => true}, "completionItemKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}, "contextSupport" => true, "dynamicRegistration" => true}, "declaration" => %{"dynamicRegistration" => true}, "definition" => %{"dynamicRegistration" => true}, "documentHighlight" => %{"dynamicRegistration" => true}, "documentLink" => %{"dynamicRegistration" => true, "tooltipSupport" => true}, "documentSymbol" => %{"dynamicRegistration" => true, "hierarchicalDocumentSymbolSupport" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "foldingRange" => %{"dynamicRegistration" => true, "lineFoldingOnly" => true, "rangeLimit" => 5000}, "formatting" => %{"dynamicRegistration" => true}, "hover" => %{"contentFormat" => ["markdown", "plaintext"], "dynamicRegistration" => true}, "implementation" => %{"dynamicRegistration" => true}, "onTypeFormatting" => %{"dynamicRegistration" => true}, "publishDiagnostics" => %{"relatedInformation" => true, "tagSupport" => %{"valueSet" => [1, 2]}, "versionSupport" => false}, "rangeFormatting" => %{"dynamicRegistration" => true}, "references" => %{"dynamicRegistration" => true}, "rename" => %{"dynamicRegistration" => true, "prepareSupport" => true}, "selectionRange" => %{"dynamicRegistration" => true}, "signatureHelp" => %{"dynamicRegistration" => true, "signatureInformation" => %{"documentationFormat" => ["markdown", "plaintext"], "parameterInformation" => %{"labelOffsetSupport" => true}}}, "synchronization" => %{"didSave" => true, "dynamicRegistration" => true, "willSave" => true, "willSaveWaitUntil" => true}, "typeDefinition" => %{"dynamicRegistration" => true}}, "window" => %{"workDoneProgress" => true}, "workspace" => %{"applyEdit" => true, "configuration" => true, "didChangeConfiguration" => %{"dynamicRegistration" => true}, "didChangeWatchedFiles" => %{"dynamicRegistration" => true}, "executeCommand" => %{"dynamicRegistration" => true}, "symbol" => %{"dynamicRegistration" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "workspaceEdit" => %{"documentChanges" => true, "failureHandling" => "textOnlyTransactional", "resourceOperations" => ["create", "rename", "delete"]}, "workspaceFolders" => true}}, "clientInfo" => %{"name" => "coc.nvim", "version" => "0.0.78"}, "processId" => 32234, "rootPath" => "/home/justinian/elixir/pragprog", "rootUri" => "file:///home/justinian/elixir/pragprog", "trace" => "off", "workspaceFolders" => [%{"name" => "pragprog", "uri" => "file:///home/justinian/elixir/pragprog"}]}}}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.10.3) lib/gen_server.ex:1013: GenServer.call/3
    (elixir 1.10.3) lib/stream.ex:441: anonymous fn/4 in Stream.each/2
    (elixir 1.10.3) lib/stream.ex:1449: Stream.do_element_resource/6
    (elixir 1.10.3) lib/stream.ex:1609: Enumerable.Stream.do_each/4
    (elixir 1.10.3) lib/stream.ex:649: Stream.run/1
    (stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6
[Error  - 3:10:52 PM] ~/git/elixir-ls/release/language_server.sh exited with code: 1
[Info  - 3:10:52 PM] Connection to server got closed. Server will restart.

15:10:52.855 [info]  Application elixir_ls_utils exited: :stopped
Started ElixirLS v0.4.0

15:10:52.855 [info]  Application erl2ex exited: :stopped

15:10:52.855 [info]  Application forms exited: :stopped
Elixir version: "1.10.3 (compiled with Erlang/OTP 21)"
Erlang version: "23"
[Warn  - 3:10:52 PM] ** (exit) exited in: GenServer.call(ElixirLS.LanguageServer.JsonRpc, {:packet, %{"id" => 0, "jsonrpc" => "2.0", "method" => "initialize", "params" => %{"capabilities" => %{"textDocument" => %{"codeAction" => %{"codeActionLiteralSupport" => %{"codeActionKind" => %{"valueSet" => ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"]}}, "dynamicRegistration" => true, "isPreferredSupport" => true}, "codeLens" => %{"dynamicRegistration" => true}, "colorProvider" => %{"dynamicRegistration" => true}, "completion" => %{"completionItem" => %{"commitCharactersSupport" => true, "deprecatedSupport" => true, "documentationFormat" => ["markdown", "plaintext"], "preselectSupport" => true, "snippetSupport" => true}, "completionItemKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}, "contextSupport" => true, "dynamicRegistration" => true}, "declaration" => %{"dynamicRegistration" => true}, "definition" => %{"dynamicRegistration" => true}, "documentHighlight" => %{"dynamicRegistration" => true}, "documentLink" => %{"dynamicRegistration" => true, "tooltipSupport" => true}, "documentSymbol" => %{"dynamicRegistration" => true, "hierarchicalDocumentSymbolSupport" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "foldingRange" => %{"dynamicRegistration" => true, "lineFoldingOnly" => true, "rangeLimit" => 5000}, "formatting" => %{"dynamicRegistration" => true}, "hover" => %{"contentFormat" => ["markdown", "plaintext"], "dynamicRegistration" => true}, "implementation" => %{"dynamicRegistration" => true}, "onTypeFormatting" => %{"dynamicRegistration" => true}, "publishDiagnostics" => %{"relatedInformation" => true, "tagSupport" => %{"valueSet" => [1, 2]}, "versionSupport" => false}, "rangeFormatting" => %{"dynamicRegistration" => true}, "references" => %{"dynamicRegistration" => true}, "rename" => %{"dynamicRegistration" => true, "prepareSupport" => true}, "selectionRange" => %{"dynamicRegistration" => true}, "signatureHelp" => %{"dynamicRegistration" => true, "signatureInformation" => %{"documentationFormat" => ["markdown", "plaintext"], "parameterInformation" => %{"labelOffsetSupport" => true}}}, "synchronization" => %{"didSave" => true, "dynamicRegistration" => true, "willSave" => true, "willSaveWaitUntil" => true}, "typeDefinition" => %{"dynamicRegistration" => true}}, "window" => %{"workDoneProgress" => true}, "workspace" => %{"applyEdit" => true, "configuration" => true, "didChangeConfiguration" => %{"dynamicRegistration" => true}, "didChangeWatchedFiles" => %{"dynamicRegistration" => true}, "executeCommand" => %{"dynamicRegistration" => true}, "symbol" => %{"dynamicRegistration" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "workspaceEdit" => %{"documentChanges" => true, "failureHandling" => "textOnlyTransactional", "resourceOperations" => ["create", "rename", "delete"]}, "workspaceFolders" => true}}, "clientInfo" => %{"name" => "coc.nvim", "version" => "0.0.78"}, "processId" => 32234, "rootPath" => "/home/justinian/elixir/pragprog", "rootUri" => "file:///home/justinian/elixir/pragprog", "trace" => "off", "workspaceFolders" => [%{"name" => "pragprog", "uri" => "file:///home/justinian/elixir/pragprog"}]}}}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.10.3) lib/gen_server.ex:1013: GenServer.call/3
    (elixir 1.10.3) lib/stream.ex:441: anonymous fn/4 in Stream.each/2
    (elixir 1.10.3) lib/stream.ex:1449: Stream.do_element_resource/6
    (elixir 1.10.3) lib/stream.ex:1609: Enumerable.Stream.do_each/4
    (elixir 1.10.3) lib/stream.ex:649: Stream.run/1
    (stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6
[Error  - 3:10:52 PM] ~/git/elixir-ls/release/language_server.sh exited with code: 1
[Info  - 3:10:52 PM] Connection to server got closed. Server will restart.

15:10:53.029 [info]  Application elixir_ls_utils exited: :stopped
Started ElixirLS v0.4.0

15:10:53.029 [info]  Application erl2ex exited: :stopped

15:10:53.029 [info]  Application forms exited: :stopped
Elixir version: "1.10.3 (compiled with Erlang/OTP 21)"
Erlang version: "23"
[Warn  - 3:10:53 PM] ** (exit) exited in: GenServer.call(ElixirLS.LanguageServer.JsonRpc, {:packet, %{"id" => 0, "jsonrpc" => "2.0", "method" => "initialize", "params" => %{"capabilities" => %{"textDocument" => %{"codeAction" => %{"codeActionLiteralSupport" => %{"codeActionKind" => %{"valueSet" => ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"]}}, "dynamicRegistration" => true, "isPreferredSupport" => true}, "codeLens" => %{"dynamicRegistration" => true}, "colorProvider" => %{"dynamicRegistration" => true}, "completion" => %{"completionItem" => %{"commitCharactersSupport" => true, "deprecatedSupport" => true, "documentationFormat" => ["markdown", "plaintext"], "preselectSupport" => true, "snippetSupport" => true}, "completionItemKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}, "contextSupport" => true, "dynamicRegistration" => true}, "declaration" => %{"dynamicRegistration" => true}, "definition" => %{"dynamicRegistration" => true}, "documentHighlight" => %{"dynamicRegistration" => true}, "documentLink" => %{"dynamicRegistration" => true, "tooltipSupport" => true}, "documentSymbol" => %{"dynamicRegistration" => true, "hierarchicalDocumentSymbolSupport" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "foldingRange" => %{"dynamicRegistration" => true, "lineFoldingOnly" => true, "rangeLimit" => 5000}, "formatting" => %{"dynamicRegistration" => true}, "hover" => %{"contentFormat" => ["markdown", "plaintext"], "dynamicRegistration" => true}, "implementation" => %{"dynamicRegistration" => true}, "onTypeFormatting" => %{"dynamicRegistration" => true}, "publishDiagnostics" => %{"relatedInformation" => true, "tagSupport" => %{"valueSet" => [1, 2]}, "versionSupport" => false}, "rangeFormatting" => %{"dynamicRegistration" => true}, "references" => %{"dynamicRegistration" => true}, "rename" => %{"dynamicRegistration" => true, "prepareSupport" => true}, "selectionRange" => %{"dynamicRegistration" => true}, "signatureHelp" => %{"dynamicRegistration" => true, "signatureInformation" => %{"documentationFormat" => ["markdown", "plaintext"], "parameterInformation" => %{"labelOffsetSupport" => true}}}, "synchronization" => %{"didSave" => true, "dynamicRegistration" => true, "willSave" => true, "willSaveWaitUntil" => true}, "typeDefinition" => %{"dynamicRegistration" => true}}, "window" => %{"workDoneProgress" => true}, "workspace" => %{"applyEdit" => true, "configuration" => true, "didChangeConfiguration" => %{"dynamicRegistration" => true}, "didChangeWatchedFiles" => %{"dynamicRegistration" => true}, "executeCommand" => %{"dynamicRegistration" => true}, "symbol" => %{"dynamicRegistration" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "workspaceEdit" => %{"documentChanges" => true, "failureHandling" => "textOnlyTransactional", "resourceOperations" => ["create", "rename", "delete"]}, "workspaceFolders" => true}}, "clientInfo" => %{"name" => "coc.nvim", "version" => "0.0.78"}, "processId" => 32234, "rootPath" => "/home/justinian/elixir/pragprog", "rootUri" => "file:///home/justinian/elixir/pragprog", "trace" => "off", "workspaceFolders" => [%{"name" => "pragprog", "uri" => "file:///home/justinian/elixir/pragprog"}]}}}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.10.3) lib/gen_server.ex:1013: GenServer.call/3
    (elixir 1.10.3) lib/stream.ex:441: anonymous fn/4 in Stream.each/2
    (elixir 1.10.3) lib/stream.ex:1449: Stream.do_element_resource/6
    (elixir 1.10.3) lib/stream.ex:1609: Enumerable.Stream.do_each/4
    (elixir 1.10.3) lib/stream.ex:649: Stream.run/1
    (stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6
[Error  - 3:10:53 PM] ~/git/elixir-ls/release/language_server.sh exited with code: 1
[Error  - 3:10:53 PM] Connection to server got closed. Server will not be restarted.



Update Github Releases?

Hi! Thank you for your work on coc-elixir. Would it be possible to update the Github releases? It helps users ascertain, at a glance, what the newest release is.

Elixir LSP Fails to Start

I'm seeing the following error using the latest version of coc-elixir:

12:28:30.454 [error] GenServer ElixirLS.LanguageServer.Server terminating
** (Mix.Error) Unknown dependency :ecto given to :import_deps in the formatter configuration. The dependency is not listed in your mix.exs for environment :prod
    (mix 1.10.4) lib/mix.ex:392: Mix.raise/1
    (mix 1.10.4) lib/mix/tasks/format.ex:246: anonymous fn/3 in Mix.Tasks.Format.eval_deps_opts/2
    (elixir 1.10.4) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
    (mix 1.10.4) lib/mix/tasks/format.ex:245: Mix.Tasks.Format.eval_deps_opts/2
    (mix 1.10.4) lib/mix/tasks/format.ex:201: anonymous fn/5 in Mix.Tasks.Format.eval_deps_and_subdirectories/4
    (mix 1.10.4) lib/mix/tasks/format.ex:210: Mix.Tasks.Format.maybe_cache_in_manifest/3
    (mix 1.10.4) lib/mix/tasks/format.ex:160: Mix.Tasks.Format.formatter_opts_for_file/2
    (language_server 0.5.0) lib/language_server/server.ex:487: ElixirLS.LanguageServer.Server.handle_request/2
Last message: {:"$gen_cast", {:receive_packet, %{"id" => 132, "jsonrpc" => "2.0", "method" => "textDocument/completion", "params" => %{"context" => %{"triggerKind" => 3}, "position" => %{"character" => 11, "line" => 183}, "textDocument" => %{"uri" => "file:///Users/james/Projects/rovr_api/test/rovr_api_web/controllers/read_receipt_controller_test.exs"}}}}}
State: %ElixirLS.LanguageServer.Server{analysis_ready?: false, awaiting_contracts: [], build_diagnostics: [], build_ref: #Reference<0.1375640648.712245250.125063>, build_running?: true, client_capabilities: %{"textDocument" => %{"codeAction" => %{"codeActionLiteralSupport" => %{"codeActionKind" => %{"valueSet" => ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"]}}, "dynamicRegistration" => true, "isPreferredSupport" => true}, "codeLens" => %{"dynamicRegistration" => true}, "colorProvider" => %{"dynamicRegistration" => true}, "completion" => %{"completionItem" => %{"commitCharactersSupport" => true, "deprecatedSupport" => true, "documentationFormat" => ["markdown", "plaintext"], "preselectSupport" => true, "snippetSupport" => true}, "completionItemKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}, "contextSupport" => true, "dynamicRegistration" => true}, "declaration" => %{"dynamicRegistration" => true}, "definition" => %{"dynamicRegistration" => true}, "documentHighlight" => %{"dynamicRegistration" => true}, "documentLink" => %{"dynamicRegistration" => true, "tooltipSupport" => true}, "documentSymbol" => %{"dynamicRegistration" => true, "hierarchicalDocumentSymbolSupport" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "foldingRange" => %{"dynamicRegistration" => true, "lineFoldingOnly" => true, "rangeLimit" => 5000}, "formatting" => %{"dynamicRegistration" => true}, "hover" => %{"contentFormat" => ["markdown", "plaintext"], "dynamicRegistration" => true}, "implementation" => %{"dynamicRegistration" => true}, "onTypeFormatting" => %{"dynamicRegistration" => true}, "publishDiagnostics" => %{"relatedInformation" => true, "tagSupport" => %{"valueSet" => [1, 2]}, "versionSupport" => false}, "rangeFormatting" => %{"dynamicRegistration" => true}, "references" => %{"dynamicRegistration" => true}, "rename" => %{"dynamicRegistration" => true, "prepareSupport" => true}, "selectionRange" => %{"dynamicRegistration" => true}, "signatureHelp" => %{"dynamicRegistration" => true, "signatureInformation" => %{"documentationFormat" => ["markdown", "plaintext"], "parameterInformation" => %{"labelOffsetSupport" => true}}}, "synchronization" => %{"didSave" => true, "dynamicRegistration" => true, "willSave" => true, "willSaveWaitUntil" => true}, "typeDefinition" => %{"dynamicRegistration" => true}}, "window" => %{"workDoneProgress" => true}, "workspace" => %{"applyEdit" => true, "configuration" => true, "didChangeConfiguration" => %{"dynamicRegistration" => true}, "didChangeWatchedFiles" => %{"dynamicRegistration" => true}, "executeCommand" => %{"dynamicRegistration" => true}, "symbol" => %{"dynamicRegistration" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, "tagSupport" => %{"valueSet" => [1]}}, "workspaceEdit" => %{"documentChanges" => true, "failureHandling" => "textOnlyTransactional", "resourceOperations" => ["create", "rename", "delete"]}, "workspaceFolders" => true}}, dialyzer_diagnostics: [], dialyzer_sup: #PID<0.124.0>, load_all_modules?: false, needs_build?: false, project_dir: "/Users/james/Projects/rovr_api", received_shutdown?: false, requests: %{}, root_uri: "file:///Users/james/Projects/rovr_api", server_instance_id: "OVfDHNaNPl1v2L2pm7StSX_IPTWne1P2", settings: %{"dialyzerEnabled" => true, "dialyzerFormat" => "dialyzer", "dialyzerWarnOpts" => [], "fetchDeps" => true, "mixEnv" => "test", "suggestSpecs" => true}, source_files: %{"file:///Users/james/Projects/rovr_api/lib/rovr_api/accounts/user.ex" => %ElixirLS.LanguageServer.SourceFile{dirty?: false, text: "defmodule RovrApi.Accounts.User do\n  @moduledoc \"\"\"\n  User data\n  \"\"\"\n\n  use Ecto.Schema\n  import Ecto.Changeset\n\n  alias RovrApi.Subscriptions.Subscription\n\n  @type t :: %__MODULE__{\n          id: String.t() | nil,\n          email: String.t() | nil,\n          confirmed_at: NaiveDateTime.t() | nil,\n          hashed_password: String.t() | nil,\n          inserted_at: NaiveDateTime.t() | nil,\n          updated_at: NaiveDateTime.t() | nil\n        }\n\n  @derive {Inspect, except: [:password]}\n  @primary_key {:id, :binary_id, autogenerate: true}\n  @foreign_key_type :binary_id\n  schema \"users\" do\n    field :email, :string\n    field :password, :string, virtual: true\n    field :hashed_password, :string\n    field :confirmed_at, :naive_datetime\n\n    has_many :subscriptions, Subscription\n\n    has_many :feeds, through: [:subscriptions, :feeds]\n\n    timestamps()\n  end\n\n  @doc \"\"\"\n  A user changeset for registration.\n\n  It is important to validate the length of both e-mail and password.\n  Otherwise databases may truncate the e-mail without warnings, which\n  could lead to unpredictable or insecure behaviour. Long passwords may\n  also be very expensive to hash for certain algorithms.\n  \"\"\"\n  @spec registration_changeset(t(), map()) :: Ecto.Changeset.t()\n  def registration_changeset(%__MODULE__{} = user, attrs) do\n    user\n    |> cast(attrs, [:email, :password])\n    |> validate_email()\n    |> validate_password()\n  end\n\n  defp validate_email(changeset) do\n    changeset\n    |> validate_required([:email])\n    |> validate_format(:email, ~r/^[^\\s]+@[^\\s]+$/, message: \"must have the @ sign and no spaces\")\n    |> validate_length(:email, max: 160)\n    |> unsafe_validate_unique(:email, RovrApi.Repo)\n    |> unique_constraint(:email)\n  end\n\n  defp validate_password(changeset) do\n    changeset\n    |> validate_required([:password])\n    |> validate_length(:password, min: 12, max: 80)\n    # |> validate_format(:password, ~r/[a-z]/, message: \"at least one lower case character\")\n    # |> validate_format(:password, ~r/[A-Z]/, message: \"at least one upper case character\")\n    # |> validate_format(:password, ~r/[!?@#$%^&*_0-9]/, message: \"at least one digit or punctuation character\")\n    |> prepare_changes(&hash_password/1)\n  end\n\n  defp hash_password(changeset) do\n    password = get_change(changeset, :password)\n\n    changeset\n    |> put_change(:hashed_password, Bcrypt.hash_pwd_salt(password))\n    |> delete_change(:password)\n  end\n\n  @doc \"\"\"\n  A user changeset for changing the e-mail.\n\n  It requires the e-mail to change otherwise an error is added.\n  \"\"\"\n  @spec email_changeset(t(), map()) :: Ecto.Changeset.t()\n  def email_changeset(%__MODULE__{} = user, attrs) do\n    user\n    |> cast(attrs, [:email])\n    |> validate_email()\n    |> case do\n      %{changes: %{email: _}} = changeset -> changeset\n      %{} = changeset -> (truncated)
[Warn  - 12:28:30 p.m.] ** (exit) exited in: GenServer.call(ElixirLS.LanguageServer.JsonRpc, {:packet, %{"jsonrpc" => "2.0", "method" => "textDocument/didChange", "params" => %{"contentChanges" => [%{"range" => %{"end" => %{"character" => 11, "line" => 183}, "start" => %{"character" => 11, "line" => 183}}, "rangeLength" => 0, "text" => "t"}], "textDocument" => %{"uri" => "file:///Users/james/Projects/rovr_api/test/rovr_api_web/controllers/read_receipt_controller_test.exs", "version" => 308}}}}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.10.4) lib/gen_server.ex:1013: GenServer.call/3
    (elixir 1.10.4) lib/stream.ex:441: anonymous fn/4 in Stream.each/2
    (elixir 1.10.4) lib/stream.ex:1449: Stream.do_element_resource/6
    (elixir 1.10.4) lib/stream.ex:1609: Enumerable.Stream.do_each/4
    (elixir 1.10.4) lib/stream.ex:649: Stream.run/1
    (stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6
[Error  - 12:28:33 p.m.] /Users/james/dotfiles/config/coc/extensions/node_modules/coc-elixir/els-release/language_server.sh exited with code: 1
[Info  - 12:28:33 p.m.] Connection to server got closed. Server will restart.
[Error  - 12:28:33 p.m.] Request textDocument/completion failed.
Error: Connection got disposed.
    at Object.dispose (/Users/james/.vim/plugged/coc.nvim/build/index.js:17340:25)
    at Object.dispose (/Users/james/.vim/plugged/coc.nvim/build/index.js:58035:35)
    at LanguageClient.handleConnectionClosed (/Users/james/.vim/plugged/coc.nvim/build/index.js:60344:42)
    at LanguageClient.handleConnectionClosed (/Users/james/.vim/plugged/coc.nvim/build/index.js:57647:15)
    at closeHandler (/Users/james/.vim/plugged/coc.nvim/build/index.js:60330:18)
    at CallbackList.invoke (/Users/james/.vim/plugged/coc.nvim/build/index.js:17980:39)
    at Emitter.fire (/Users/james/.vim/plugged/coc.nvim/build/index.js:18039:36)
    at closeHandler (/Users/james/.vim/plugged/coc.nvim/build/index.js:16676:26)
    at CallbackList.invoke (/Users/james/.vim/plugged/coc.nvim/build/index.js:17980:39)
    at Emitter.fire (/Users/james/.vim/plugged/coc.nvim/build/index.js:18039:36)
[Error  - 12:28:33 p.m.] Request textDocument/completion failed.
Error: Connection got disposed.
    at Object.dispose (/Users/james/.vim/plugged/coc.nvim/build/index.js:17340:25)
    at Object.dispose (/Users/james/.vim/plugged/coc.nvim/build/index.js:58035:35)
    at LanguageClient.handleConnectionClosed (/Users/james/.vim/plugged/coc.nvim/build/index.js:60344:42)
    at LanguageClient.handleConnectionClosed (/Users/james/.vim/plugged/coc.nvim/build/index.js:57647:15)
    at closeHandler (/Users/james/.vim/plugged/coc.nvim/build/index.js:60330:18)
    at CallbackList.invoke (/Users/james/.vim/plugged/coc.nvim/build/index.js:17980:39)
    at Emitter.fire (/Users/james/.vim/plugged/coc.nvim/build/index.js:18039:36)
    at closeHandler (/Users/james/.vim/plugged/coc.nvim/build/index.js:16676:26)
    at CallbackList.invoke (/Users/james/.vim/plugged/coc.nvim/build/index.js:17980:39)
    at Emitter.fire (/Users/james/.vim/plugged/coc.nvim/build/index.js:18039:36)
[Error  - 12:28:33 p.m.] Request textDocument/completion failed.
Error: Connection got disposed.
    at Object.dispose (/Users/james/.vim/plugged/coc.nvim/build/index.js:17340:25)
    at Object.dispose (/Users/james/.vim/plugged/coc.nvim/build/index.js:58035:35)
    at LanguageClient.handleConnectionClosed (/Users/james/.vim/plugged/coc.nvim/build/index.js:60344:42)
    at LanguageClient.handleConnectionClosed (/Users/james/.vim/plugged/coc.nvim/build/index.js:57647:15)
    at closeHandler (/Users/james/.vim/plugged/coc.nvim/build/index.js:60330:18)
    at CallbackList.invoke (/Users/james/.vim/plugged/coc.nvim/build/index.js:17980:39)
    at Emitter.fire (/Users/james/.vim/plugged/coc.nvim/build/index.js:18039:36)
    at closeHandler (/Users/james/.vim/plugged/coc.nvim/build/index.js:16676:26)
    at CallbackList.invoke (/Users/james/.vim/plugged/coc.nvim/build/index.js:17980:39)
    at Emitter.fire (/Users/james/.vim/plugged/coc.nvim/build/index.js:18039:36)
Started ElixirLS v0.5.0
Elixir version: "1.10.4 (compiled with Erlang/OTP 23)"
Erlang version: "23"
ElixirLS compiled with Elixir 1.10.3 and erlang 23
MIX_ENV: test
MIX_TARGET: host
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  bcrypt_elixir 2.2.0
  bodyguard 2.4.0
  bunt 0.2.0
  castore 0.1.6
  certifi 2.5.1
  combine 0.10.0
  comeonin 5.3.1
  connection 1.0.4
  cors_plug 2.0.2
  cowboy 2.8.0
  cowlib 2.9.1
  credo 1.4.0
  db_connection 2.2.2
  decimal 1.8.1
  dialyxir 1.0.0
  ecto 3.4.4
  ecto_sql 3.4.4
  elixir_make 0.6.0
  erlex 0.2.6
  feeder 2.3.2
  feeder_ex 1.1.0
  floki 0.26.0
  gettext 0.18.0
  hackney 1.15.2
  html_entities 0.5.1
  idna 6.0.0
  jason 1.2.1
  jsonapi 1.3.0
  metrics 1.0.1
  mime 1.3.1
  mimerl 1.2.0
  mint 1.1.0
  oban 2.0.0-rc.3
  parse_trans 3.3.0
  phoenix 1.5.3
  phoenix_ecto 4.1.0
  phoenix_html 2.14.2
  phoenix_live_dashboard 0.2.6
  phoenix_live_view 0.13.3
  phoenix_pubsub 2.0.0
  phx_gen_auth 0.4.0
  plug 1.10.3
  plug_cowboy 2.3.0
  plug_crypto 1.1.2
  postgrex 0.15.5
  ranch 1.7.1
  sentry 7.2.4
  sobelow 0.10.3
  ssl_verify_fun 1.1.5
  telemetry 0.4.1
  telemetry_metrics 0.5.0
  telemetry_poller 0.5.0
  tesla 1.3.3
  timex 3.6.2
  tzdata 1.0.3
  unicode_util_compat 0.4.1
All dependencies are up to date
==> ecto_sql
Compiling 26 files (.ex)
Generated ecto_sql app
==> oban
Compiling 20 files (.ex)
Generated oban app
==> plug_crypto
Compiling 5 files (.ex)
Generated plug_crypto app
==> plug
Compiling 1 file (.erl)
Compiling 40 files (.ex)
[Warn  - 12:28:45 p.m.] warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/catch
  lib/plug/conn/wrapper_error.ex:23

Generated plug app
==> bodyguard
Compiling 9 files (.ex)
[Warn  - 12:28:49 p.m.] warning: function actions/1 required by protocol Plug.Exception is not implemented (in module Plug.Exception.Bodyguard.NotAuthorizedError)
  lib/bodyguard/not_authorized_error.ex:8: Plug.Exception.Bodyguard.NotAuthorizedError (module)

Generated bodyguard app
==> cors_plug
Compiling 1 file (.ex)
Generated cors_plug app
==> jsonapi
Compiling 21 files (.ex)
Generated jsonapi app
==> plug_cowboy
Compiling 6 files (.ex)
Generated plug_cowboy app
==> phoenix_html
Compiling 8 files (.ex)
Generated phoenix_html app
==> phoenix
Compiling 66 files (.ex)
Generated phoenix app
==> sentry
Compiling 14 files (.ex)
Generated sentry app
==> phoenix_live_view
Compiling 18 files (.ex)
Generated phoenix_live_view app
==> phoenix_live_dashboard
Compiling 33 files (.ex)
Generated phoenix_live_dashboard app
==> phoenix_ecto
Compiling 7 files (.ex)

In a previous session the :ecto dependency was something else entirely.

Buffer source replaces LS sources when starting typing

Hey, I observe an issue with autocompletion. At first I can see what seems to be a correct autocomplete from the LS:
image
after I type, for a few characters I might be okey:
image
but eventually the LS source suggestions get replaced by buffer suggestions:
image

My CocConfig is:

{
  "elixirLS.dialyzerEnabled": false,
  "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh"
}

Is autocomplete supported on .eex file?

I am using the extension just fine on all elixir file, but autocomplete doesnot seems to work on .eex file, is this feature supported by this plugin?

Thanks

coc-elixir crashing on Elixir 1.16

Hi ๐Ÿ‘‹

Building coc-elixir on Elixir 1.16.0 is now crashing. It fails because of this error:

** (UndefinedFunctionError) function Mix.Dep.load_on_environment/1 is undefined or private
    (mix 1.16.0) Mix.Dep.load_on_environment([env: :dev])
    (mix_task_archive_deps 0.5.0) lib/mix/tasks/archive/build.deps.ex:61: Mix.Tasks.Archive.Build.Deps.list/1
    (mix_task_archive_deps 0.5.0) lib/mix/tasks/archive/build.deps.ex:42: Mix.Tasks.Archive.Build.Deps.build_archives/1
    (mix 1.16.0) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5
    (elixir_ls_utils 0.19.0) lib/mix.tasks.elixir_ls.release.ex:17: Mix.Tasks.ElixirLs.Release.run/1
    (mix 1.16.0) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.16.0) lib/mix/cli.ex:96: Mix.CLI.run_task/2
    /Users/alvaro.villen/.asdf/installs/elixir/1.16.0/bin/mix:2: (file)

It looks like the Mix.Dep.load_on_environment/1 was removed in the new Elixir release on this commit elixir-lang/elixir@d46fa4b.

I'm following the next steps to reproduce the issue and it fails on the latest step:

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

How do you autoformat eelixir files ?

This awesome library made me switch from Spacemacs to Neovim ๐Ÿ‘ . Everything is working fine, but I have one issue.

What do you use for autoformatting eelixir or .eex files ? I have tried a bunch of plugins and none seem to work. Any pointers will be much appreciated.

Thanks

Elixir LS fails to start. Not really sure why.

both elixir and mix are available in my path and I installed through :CocInstall coc-elixir

The LS works when using vscode, but not neovim :(

output of :CocInfo

## versions

vim version: NVIM v0.9.0
node version: v17.8.0
coc.nvim version: 0.0.82-b7375d5f 2023-01-30 05:09:03 +0800
coc.nvim directory: /home/benbot/.vim/plugged/coc.nvim
term: guake
platform: linux

## Log of coc.nvim

2023-04-17T11:17:58.925 INFO (pid:20717) [plugin] - coc.nvim initialized with node: v17.8.0 after 1923
2023-04-17T11:17:58.926 INFO (pid:20717) [services] - LanguageClient elixir state change: stopped => starting
2023-04-17T11:17:58.936 INFO (pid:20717) [language-client-index] - Language server "elixir" started with 20731
2023-04-17T11:17:59.152 INFO (pid:20717) [services] - LanguageClient elixir state change: starting => stopped
2023-04-17T11:17:59.152 INFO (pid:20717) [services] - LanguageClient elixir state change: stopped => starting
2023-04-17T11:17:59.155 ERROR (pid:20717) [language-client-client] - Server elixir initialization failed. jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:17:59.156 INFO (pid:20717) [services] - LanguageClient elixir state change: starting => stopped
2023-04-17T11:17:59.157 ERROR (pid:20717) [server] - unhandledRejection  Promise {
  <rejected> jh [Error]: Pending response rejected since connection got disposed
      at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
      at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
      at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
      at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
      at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
      at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
      at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
      at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
      at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
      at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
    code: -32097,
    data: undefined
  }
} jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:17:59.160 INFO (pid:20717) [language-client-index] - Language server "elixir" started with 20835
2023-04-17T11:17:59.374 INFO (pid:20717) [services] - LanguageClient elixir state change: stopped => starting
2023-04-17T11:17:59.374 ERROR (pid:20717) [language-client-client] - Server elixir initialization failed. jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:17:59.374 INFO (pid:20717) [services] - LanguageClient elixir state change: starting => stopped
2023-04-17T11:17:59.374 ERROR (pid:20717) [services] - Server elixir failed to start: jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:17:59.378 INFO (pid:20717) [language-client-index] - Language server "elixir" started with 20938
2023-04-17T11:17:59.598 INFO (pid:20717) [services] - LanguageClient elixir state change: stopped => starting
2023-04-17T11:17:59.598 ERROR (pid:20717) [language-client-client] - Server elixir initialization failed. jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:17:59.598 INFO (pid:20717) [services] - LanguageClient elixir state change: starting => stopped
2023-04-17T11:17:59.602 INFO (pid:20717) [language-client-index] - Language server "elixir" started with 21041
2023-04-17T11:17:59.817 ERROR (pid:20717) [language-client-client] - Server elixir initialization failed. jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:19:24.315 INFO (pid:20717) [attach] - receive notification: showInfo []
2023-04-17T11:20:35.569 INFO (pid:20717) [attach] - receive notification: showInfo []

Unable to run coc-elixir after upgrading to 0.5

The language server won't start. I've tested cleaning out deps, re-installing etc but still not able to get it to run.

Stacktrace:
** (UndefinedFunctionError) function ElixirLS.LanguageServer.CLI.main/0 is undefined (module ElixirLS.LanguageServer.CLI is not available) ElixirLS.LanguageServer.CLI.main()

coc-elixir is not working

Description
None of the features of coc-elixir in neovim are working for me.

Reproduction steps

  • installed neovim v0.4.3
  • installed coc with Plug as the only plugin as described in https://github.com/neoclide/coc.nvim
  • installed coc-elixir with :CocInstall coc-elixir
  • restart neovim, open on existing elixir project, result, see picture

Screenshot from 2020-05-10 12-18-05

My setup
Ubuntu v18.04
neovim v0.4.3
checkhealth is OK for coc

it may fail when using asdf and other versioning tools

I work in different elixir projects that use different erlang and elixir versions, to manage this I use asdf so each project has a local file to define the correct versions and the system versions also come into play.

Is there a way to make elixir-lsp aware of this? so it rebuilds a new version when necessary with the correct combination.

Extension fails to load with "missing main file"

I am a new coc user and I tried to install the elixir plugin and got this error.

`[coc.nvim] extension "coc-elixir" doesn't contain main file /home/rsimmonsjr/.vim/plugged/coc-elixir/lib/index.js.1

Upgrade elixir-ls

There have been new releases of elixir-ls and the way this coc-elixir file works by default is to compile the v0.3.0 version. There have been patch releases after this. How about a bump to the latest version?

No @spec suggestions showing up

Hi! First, thanks so much for this extension! It's great so far!

I have noticed that I don't get any @spec suggestions, despite the default value of elixirLS.suggestSpecs being true, and even when I explicitly set it to true in my CoC config.

I don't see any errors in the ElixirLS log when I run :CocCommand workspace.showOuptut.

Is there a key I need to map to make them show up?

Duplicated Erlang binaries resulting in `:badfile` error

I'm unsure why, but whenever I use this particular plugin with Elixir, I always end up with several issues:

  1. it continues to create a .elixir_ls directory in my project even though"elixirLS.dialyzerEnabled": false is set in my coc-settings. According to the README this is only needed for Dialyzer
  2. when I start my Phoenix application or start the tests, I sometimes encounter duplicated binaries as if multiple versions of the project had been built and suffixed, which obviously confuses the runtime -- take notice to the 2 suffix right before the .beam file extension
13:32:55.608 [error] Loading of ~/foo/_build/dev/lib/thinger_majigger/ebin/Elixir.Foo.LiveHelpers 2.beam failed: :badfile

I currently just $ rm -rf _build/dev and rebuild from scratch which kinda sucks since the project must be rebuilt again

If anyone has encountered a way to address/fix this, I'd love to know. Thanks

Go to definition not working

It seems only go to definition not work here.

This is my configs:
Screen Shot 2020-11-15 at 20 36 54
Screen Shot 2020-11-15 at 20 37 28

It's very strange as the other features work properly but when i try to <C-]> it shows me a messages:

Screen Shot 2020-11-15 at 20 40 07

Can someone help me? Thanks in advance

Go to definition not working with `elixir_ls` `v0.9.0`

Installed plugins:

Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'elixir-lsp/coc-elixir', {'do': 'yarn install && yarn prepack'}

ElixirLS installation:

I installed elixir_ls from source following the Server fails to start procedure we have in our README. Following that installs version 0.9.0.

Problem:

With that setup go to definition does not work and displays the error [coc.nvim] definition not found.

The language server output - CocCommand workspace.showOutput elixir - is clear of errors, it shows that ElixirLS v0.9.0 has started, all Elixir and Erlang/OTP versions match those I have on my machine and MIX ENV and MIX TARGET also do.

If I run :CocList services I can see elixir listed as [running].

Downgrading elixir_ls to v0.7.0 solves the issue.

Environment:

NVIM: v0.6.0
Node: 17.2.0
Elixir: 1.13.1
Erlang/OTP: 24.1.4

Support for running tests via new code lens

elixir-lsp/elixir-ls#389 added support to build up a command to run exunit tests from a code lens (all the user has to do is click on the code lens). It would be great to be able to support this in some way in coc-elixir. The VSCode implementation is at elixir-lsp/vscode-elixir-ls#155

Some thoughts:

  • I'm not sure how interacting with the terminal will work for coc-elixir
  • It might make sense to update ElixirLS to build a full example test command instead of building the test command within each extension

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.