Introducing ElixirLS, the Elixir Language Server

Yes a new release is necessary. I plan to cut one later today:

6 Likes

Version 0.9.0 was released today! :rocket:

The biggest change is that Elixir 1.13 is now supported :confetti_ball:! Thanks @lukaszsamson :heart:!

Also fetchDeps now defaults to false (both in ElixirLS and vscode-elixir-ls) since it is prone to race conditions, especially with Elixir 1.13’s semantic recompilation. Thanks @jonleighton :heart:!

And PathGlob has been integrated to speed up formatting and avoid a costly Path.wildcard that has to hit the file system.

Improvements:

  • Elixir 1.13 support (thanks Łukasz Samson) #620
  • Fix formatting performance problems with .formatter.exs in subdirectories (thanks Jon Leighton) #609
  • Allow watching additional extensions via additionalWatchedExtensions (thanks Vanja Bucic) #569
  • Support for setting additional environment variables (thanks vacarsu) #622
  • Allow configuring debugExpressionTimeoutMs (thanks Jason Axelson) #613

Changes:

  • Default fetchDeps to false (thanks Jason Axelson) #633
    • fetchDeps causes some bad race conditions, especially with Elixir 1.13

Bug Fixes:

  • Add indentation following “do” completion (thanks AJ Foster) #606

Housekeeping:

  • Add initial mkdocs documentation website (thanks Daniils Petrovs) #619
    • Note: this isn’t actually live yet, we still need to workout a bug in the GitHub actions script
  • Update to elixir-lsp fork of mix_task_archive_deps (thanks Jason Axelson) #628

VSCode:

Changelog link

28 Likes

Hi @axelson, thank you for this update. As ElixirLS now supports elixir 1.13 should its formatting capabilities include plugins used in formatter.exs? I’m using surface_formatter that introduced this kind of plugin since version 0.7.2 and html tags are formatted correctly between ~F sigils on mix format run manually but not “on save” in VS Code where ElixirLS extension is used (elixir code is formated fine though).

1 Like

Hi, I haven’t had a chance to test with a formatter plugins and some additional work in ElixirLS might be needed to support them. Are you configuring the formatter plugin in the root .formatter.exs file or is it inside a subdirectory? There’s some issues with subdirectory .formatter.exs that I’m currently working on that didn’t make it into the latest release.

It’s in the root .formatter.exs

[
  import_deps: [:ecto, :phoenix, :surface],
  inputs: [
    "*.{ex,exs}",
    "priv/*/seeds.exs",
    "{config,lib,test}/**/*.{ex,exs,sface}"
  ],
  plugins: [Surface.Formatter.Plugin],
  subdirectories: ["priv/*/migrations"]
]

That means ElixirLS doesn’t use mix format but performs formatting in its own way somehow?

2 Likes

Hi! I am not sure if I can post this question on this thread.

I am using Spacemacs and have this error

LSP :: Error from the Language Server: [DocumentSymbols] Compilation error while parsing source file (Server End Error)

And checked lsp-log file but it seems ok.

Can anyone tell me what cause this error?

Version 0.10.0 was released :rocket:

This release brings improved compatibility with OTP 24 and 25 and a lot of new features. The biggest improvements are in debugger, see details below. Other include new completions in bitstring and sigil, fixed handling of MIX_TARGET and links to hexdocs in haver

Improvements to debugger adapter:

Improvements to language server:

VSCode:

Houskeeping:

thanks Łukasz Samson, Thanabodee Charoenpiriyakij, Daniils Petrovs, Jason Axelson

14 Likes

Thanks a lot for the hard work all the contributors did!

Especially this one is pure gold for me! :point_up: :heart: Thanks.

2 Likes