Comments (7)
@hissssst @lauriannala I have found a workaround.
- Download the latest releases of here https://github.com/elixir-lsp/elixir-ls/releases (download
elixir-ls.zip
file). - Find where
coc.nvim
have installed your Elixir's Language Server – you can do it like this:
$ find ~ -name 'language_server.sh'
/Users/cr0t/.config/coc/extensions/node_modules/coc-elixir/els-release/language_server.sh
- In my case, I have replaced all the files in my
/Users/cr0t/.config/coc/extensions/node_modules/coc-elixir/els-release/
directory with the files from the downloaded zip-archive – like that:
$ rm -rf /Users/cr0t/.config/coc/extensions/node_modules/coc-elixir/els-release/*
$ cd ~/Downloads
$ unzip elixir-ls.zip -d /Users/cr0t/.config/coc/extensions/node_modules/coc-elixir/els-release/
(keep in mind, that in your system -d
option to unzip
might not work or work differently; I ran these commands on macOS 12.1)
- Profit! (Now autocompletion works even in Elixir 1.13 projects!)
from coc-elixir.
Autocompletion is not working for me either, setting up elixir-ls on coc-config works.
CocCommand workspace.showOutput reports an error on autocompletion attempt:
[Error - 1:50:57 PM] Request textDocument/completion failed.
Message: an exception was raised:
** (CaseClauseError) no case clause matching: {:ok, 1, 11, [], [{:atom, {1, 5, nil}, :world}]}
(elixir_sense 2.0.0) lib/elixir_sense/core/normalized/tokenizer.ex:16: ElixirSense.Core.Normalized.Tokenizer.do_tokenize_1_7/1
(elixir_sense 2.0.0) lib/elixir_sense/core/parser.ex:230: ElixirSense.Core.Parser.fix_parse_error/3
(elixir_sense 2.0.0) lib/elixir_sense/core/parser.ex:118: ElixirSense.Core.Parser.string_to_ast/5
(elixir_sense 2.0.0) lib/elixir_sense/core/parser.ex:32: ElixirSense.Core.Parser.parse_string/4
(language_server 0.7.0) lib/language_server/providers/completion.ex:100: ElixirLS.LanguageServer.Providers.Completion.completion/4
(language_server 0.7.0) lib/language_server/server.ex:770: anonymous fn/3 in ElixirLS.LanguageServer.Server.handle_request_async/2
Code: -32000
defmodule CocElixirIssue do
def hello do
Enum. # <-- Problem experienced here on autocomplete attempt.
:world
end
end
Version info:
Started ElixirLS v0.7.0
Elixir version: "1.13.0 (compiled with Erlang/OTP 24)"
Erlang version: "24"
ElixirLS compiled with Elixir 1.8.2 and erlang 21
MIX_ENV: test
MIX_TARGET: host
from coc-elixir.
I've switched to neovim's lsp recently and do not work much on elixir projects at work atm. so I couldn't give attention to this small project.
This extension doesn't do anything fancy it's a wrapper around elixir-ls. so with manual installation mentioned in the readme or using coc's manual configuration same experience should be available for the end user. but with extra steps. achieving out of the box experience is a bit tricky (we should publish with minimum version of elixir and otp supported by the language server to support more users and some small issues that i can't remember now).
With that being said if i find a way to automate build/publish via github actions that would be great (PR welcome).
from coc-elixir.
@hissssst @lauriannala I have found a workaround.
- Download the latest releases of here https://github.com/elixir-lsp/elixir-ls/releases (download
elixir-ls.zip
file).- Find where
coc.nvim
have installed your Elixir's Language Server – you can do it like this:$ find ~ -name 'language_server.sh' /Users/cr0t/.config/coc/extensions/node_modules/coc-elixir/els-release/language_server.sh
- In my case, I have replaced all the files in my
/Users/cr0t/.config/coc/extensions/node_modules/coc-elixir/els-release/
directory with the files from the downloaded zip-archive – like that:$ rm -rf /Users/cr0t/.config/coc/extensions/node_modules/coc-elixir/els-release/* $ cd ~/Downloads $ unzip elixir-ls.zip -d /Users/cr0t/.config/coc/extensions/node_modules/coc-elixir/els-release/
(keep in mind, that in your system
-d
option tounzip
might not work or work differently; I ran these commands on macOS 12.1)
- Profit! (Now autocompletion works even in Elixir 1.13 projects!)
Thank you! That worked flawlessly :)
from coc-elixir.
Hmmm,
Setting elixirLS like described here works correctly with autocompletion
https://github.com/neoclide/coc.nvim/wiki/Language-servers#elixir
from coc-elixir.
From this comment elixir-lsp/elixir_sense#148 it seems that the ElixirLS version is outdated.
I (and I might assume as the other participants in this issue) have installed coc-elixir
via :CocInstall coc-elixir
command that is given in the README of https://github.com/elixir-lsp/coc-elixir.
It turns out that it downloads and installs an outdated (last release was 7 months ago) coc-elixir NPM package, instead of the new one.
@amiralies, is there any way to build and publish a new release to the npmjs?
If not, shall the vim-plug
be a preferrable way of using this server? Or any other tips?
from coc-elixir.
This repo seems a little bit abandoned (on activity since May 2020, no tags after version 0.7.0
, no releases of new version). @lukaszsamson do you know maintainer of this package, or if anything can be done do update the package? Sorry for disturbing you.
from coc-elixir.
Related Issues (20)
- Error to start when version of projects are different HOT 2
- How do you autoformat eelixir files ? HOT 2
- Upgrade to v0.6.x HOT 1
- " ... "mix compile" failed" in coc workspace output HOT 2
- Go to definition not working HOT 4
- Support for running tests via new code lens
- Add end after opening do block HOT 2
- Server fails to start HOT 7
- it may fail when using asdf and other versioning tools HOT 2
- update to elixir-ls v0.6.3 HOT 1
- Duplicated Erlang binaries resulting in `:badfile` error
- Error: spawn .../language_server.sh ENOENT HOT 4
- Is autocomplete supported on .eex file?
- Fails to lint/run diagnostics on larger projects HOT 4
- Go to definition not working with `elixir_ls` `v0.9.0` HOT 1
- Buffer source replaces LS sources when starting typing
- Elixir LS fails to start. Not really sure why. HOT 4
- The ElixirLS - project server crashed 5 times in the last 3 minutes. The server will not be restarted.
- coc-elixir crashing on Elixir 1.16 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc-elixir.