victorolinasc
Emacs lsp-mode (language server) + elixir-ls anyone?
Has anyone tried the emacs lsp-mode + elixir-ls?
I’ve noticed that the emacs support is starting to get behind other editors. Actually, alchemist and elixir-mode are really nice, but they are lagging behind in terms of evolution. Several issues without answer and no new releases for a while.
I started to take a look at alternatives and I really like the idea of a Language Server for Elixir (and Erlang). Elixir-ls works nicely with Visual Studio Code and I wonder if it would work with emacs-lsp but Haven found the time to try it yet.
So, has anyone tried this combination with luck? I really think all efforts on IDE/text editors support should focus on language server now. We would all have a very similar experience with our prefered keybindings and plugins…
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #performance










First 10 of 19 Posts
karmajunkie
Definitely agree—I use spacemacs daily but know just enough elisp to be dangerous… literally. Trying get
mix formatto format my code on save i managed to get my emacs into a situation where I literally could not close it short of a force kill. Don’t ask me how, I have no idea.So the moral of the story is that I’m at the tender mercies of those brave souls who forge a path for us mortals to tread. I wish I could help move integrations like alchemist forward, but seriously, I’m a danger to others. I’m going to check out this lsp-mode and pray I don’t manage set off a WarGames situation. Will report back if I’m successful, but don’t wait too long to send out search parties.
rodrigues
Seems an interesting path to move into!
My elisp is also potentially dangerous heheh, I’ve been using emacs for a couple of months only, so I can only do the basic stuff… but gonna play a bit with it, at least take a look at what they did for the other languages
@karmajunkie on the
mix formatissue, I’m using GitHub - anildigital/mix-format.el: Emacs package to format Elixir code in Emacs with elixir-mode · GitHub, so far no problems with it!victorolinasc
I am using mix-format too, though it is a bit slower on Emacs than on VS Code. The issue is that it is not on Melpa yet so I`ve copied it to my config.
Also, the creator of mix-format is interested in merging it into elixir-mode itself. Though it seems it is blocked currently because there is a shortage of elisp reviewers =/
rodrigues
Was trying to hack my way through this, but it still doesn’t work. Here is the wip as for now: https://gist.github.com/rodrigues/a7277c70ab9be361390fa52f923e7e03
karmajunkie
Any luck with that approach?
edmz
BTW, Spacemacs just added LSP support. Maybe you can see what they did there to make it work.
JakeBecker
I’ve just gotten around to publishing a precompiled release package which includes
.shand.batscripts for launching the language server and debugger: Releases · JakeBecker/elixir-ls · GitHubI’m hoping this makes it easier to integrate into IDE plugins. Hope that helps @rodrigues and everyone!
rodrigues
It’s definitely still in progress, but now it’s talking to elixir-ls behind the scenes!! https://gist.github.com/rodrigues/a7277c70ab9be361390fa52f923e7e03
Thanks @JakeBecker, the releases really helped!
EDIT: moved it into a github repo. PRs are more than welcome!
https://github.com/rodrigues/lsp-elixir
erikbye
I’m using Alchemist with elixir-ls.
https://github.com/tonini/alchemist.el/pull/341
victorolinasc
I’ve managed to get elixir-ls through alchemist working too. Here is my configuration just in case anyone would want to give it a try:
First, I’ve cloned @Trevoke’s for on
~/.alchemist. Then on myinit.el(withuse-packagealready configured), I have:Hope this helps!