ElixirLS Fork - Language Server Protocol implementation for Elixir

Hi all! :wave:

I’m pleased to announce that version 0.3.0 of the ElixirLS Fork project has been released! :confetti_ball:

What’s new in 0.3.0

  • Add workspaceSymbol support to quickly navigate to modules, functions, callbacks
    • This is huge! Now you can navigate to a module by the module name, or navigate to a function with f function_name, or a type with t type_name (full instructions are in the Readme)
    • VSCode use Cmd+t (or Ctrl+t), Spacemacs lsp-mode use , g s
  • Elixir 1.10 support
  • Provide completions for protocol functions
  • Lots of ElixirSense fixes
  • Various stability updates

Screenshot of workspaceSymbol support in action:
Screenshot 2020-02-14 15.07.21

Full changelog: elixir-ls/CHANGELOG.md at v0.3.0 · elixir-lsp/elixir-ls · GitHub
Full diff: Comparing v0.2.28...v0.3.0 · elixir-lsp/elixir-ls · GitHub

Thanks to all the contributors that made this release possible:

  • @lukaszsamson for the majority of the improvements (including the workspaceSymbol support)
  • @cdegroot - Source asdf on startup
  • Ahmed Hamdy - Updated startup message
  • Jonáš Trantina - Requesting didSave in server capabilities
  • @JakeBecker for the original implementation

If you’re using VSCode it should update automatically, if you’re running emacs lsp-mode or coc.vim you will probably have to update manually via git pull and then run mix elixir_ls.release again.

GitHub: GitHub - elixir-lsp/elixir-ls: A frontend-independent IDE "smartness" server for Elixir. Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol"
VSCode: ElixirLS Fork: DEPRECATED (use original extension) - Visual Studio Marketplace

The reason for this fork

This fork started when Jake Becker’s repository became inactive for an extended period of time. So we decided to start an active fork to merge dormant PR’s and fix issues where possible. We also believe in an open and shared governance model to share the work instead of relying on one person to shoulder the whole burden.

58 Likes

Thank you for the update. But it did not work for me for version Elixir 1.10, the autocomplete and jump to definition doesn’t work and there is a forever “Loading…” going on. I am using latest VS Code. Is there any step I need to follow to make it work with 1.10? Anyways, if it helps, I’ve attached the output https://pastebin.com/zA5s0Qzv

It works great otherwise. Thanks again :slight_smile:

Woohoo a new version🤘
Thank you for the hard work you put into it.

1 Like

It seems that dialyzer PLT cache is out of date or corrupted. Please try removing .elixir_ls directory. As pointed out in the readme jump to workspace symbol currently requires dialyzer integration.

2 Likes

Thanks for the hard work @axelson.

1 Like

Thanks so much for the release!

1 Like

Thank you @axelson, your efforts are much appreciated.

2 Likes

Thanks @axelson! Incredible work.

1 Like

Actually I tried removing that too. Didn’t work. But seems like I somehow had vscode-elixir plugin enabled, and the moment I disabled it, it started working fine. And it goes without saying, amazing plugin, can’t thank the team enough for this :slight_smile:

2 Likes

Version 0.3.1 was released today! :confetti_ball:

General:

  • The debugger works again :tada: (but it’s broken in 1.10 until a new elixir release that includes this fix)
  • Code lens (this is what shows you generated @spec lines) is more reliable
  • Fix a couple cases where we weren’t matching the lsp spec

VSCode:

  • Do not highlight function calls the same as function definitions

Full changelog

19 Likes

Thanks @axelson

1 Like

Version 0.3.2 was released today! :tada:

Here are the highlights:

General:

  • Significantly speed up dialyzer checks #165 (thanks hworld)
  • Speed up dialyzer manifest writing by using a lower compression level (thanks to hworld) #164
  • Fix dialyzer errors not being reported for umbrella projects #149 (thanks hworld)
  • Bump ElixirSense
    • Fixes find all references doesn’t work with argument defaults #150
    • Adds erlang edoc support elixir_sense #86

VSCode specific:

Full Changelog

24 Likes

Hey, I’m finally trying out your new ElixirLS!

Is there a way to autocomplete Elixir expression tags like <%= %> ?

Assuming you’re using VSCode, if you’re in a .html.eex then typing <% should automatically insert %> for you. Is that what you’re asking?

Hello,

I don’t know how to search for symbols : I tpye Cmd+T, add “Enu” so the fields is “#Enu”, or I type “#f start_link” but nothing shows up. I have the feeling that the default symbol search is still active. Any idea ?

Yes, I am using VSCode.

Your response revealed the issue to me. I’m in a LiveView module with HTML embedded inside a ~L sigil, not an .html.eex file.

Is there a way to extend the autocompletion to work in a .ex file?

It appears that either a VSCode update or a more recent version of vscode-elixir-ls may have broken the workspace symbol search. Can you please file an issue at https://github.com/elixir-lsp/vscode-elixir-ls/

Here you go

1 Like

That’s not currently supported, but I believe that would be possible to add to the VSCode extension.