Yes a new release is necessary. I plan to cut one later today:
Version 0.9.0 was released today!
The biggest change is that Elixir 1.13 is now supported ! Thanks @lukaszsamson !
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 !
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:
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:
- Change the default of
fetchDeps
to false (thanks Jason Axelson) #189 - Allow configuring the debug expression timeout (thanks Jason Axelson) #210
- Set which pairs of brackets should be colorized (thanks S. Arjun) #207
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).
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?
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
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:
-
A lot of new features around breakpoints: function breakpoints, conditional breakpoints, hit count and log points #656, #661, #671 (thanks Łukasz Samson)
-
Completions in debugger eval console #679 (thanks Łukasz Samson)
-
Debugger evaluate results can now be expanded #672 (thanks Łukasz Samson)
-
Messages in the queue of debugged process can now be examined #681 (thanks Łukasz Samson)
-
Debugger can now handle pause and terminateThread requests #675 (thanks Łukasz Samson)
-
Clipboard and hover eval is now supported in debugger #680 (thanks Łukasz Samson)
-
Auto interpretting can now be disabled #616 (thanks Jason Axelson)
-
Debugger conforms better to DAP 1.51 specification #678 (thanks Łukasz Samson)
Improvements to language server:
-
Language server can now be restarted via custom command (e.g. from VSCode) #653 (thanks Łukasz Samson)
-
Numerous cases of invalid UTF8-UTF16 position conversions fixed #677 (thanks Łukasz Samson)
-
Improved MIX_TARGET environment variable handling #670 (thanks Masatoshi Nishiguchi)
-
defmodule snippet now suggests a module name #684 (thanks Manos Emmanouilidis)
-
Constant recompilation on Nerves projects fixed #686 (thanks Łukasz Samson)
-
Invalid negative positions in diagnostics are no longer emitted #695 (thanks Łukasz Samson)
-
Improvements to document symbols provider (improvements to document symbols provider · elixir-lsp/elixir-ls@1e38db4 · GitHub) (thanks Łukasz Samson)
-
Added support for OTP 25 new dialyzer options (add support for OPT 25 dialyzer opts · elixir-lsp/elixir-ls@0da7623 · GitHub) (thanks Łukasz Samson)
-
Improvements to complete (operator, sigil, bitstring) #150, (add suggestions of bitstring types and options · elixir-lsp/elixir_sense@33df514 · GitHub) (thanks Łukasz Samson)
-
Improved alias resolution (Alias resolution: alias __MODULE__, as: Self · Issue #151 · elixir-lsp/elixir_sense · GitHub) (thanks Łukasz Samson)
-
Fixed crash on OTP 24.2 (fixcrash on OTP 24.2 · elixir-lsp/elixir_sense@72f3d4f · GitHub) (thanks Łukasz Samson)
-
Better function detection when hovering inside string interpolation #152 (thanks Milo Lee)
-
Support for external plugins to elixir_sense #141 (thanks Zach Daniel)
VSCode:
-
To Pipe and From Pipe code transformation command #182 (thanks Paulo Valente)
-
Restart language server command added #218 (thanks Łukasz Samson)
-
New settings related to auto interpreting in debugger (Debugger: New settings related to interpreting modules · elixir-lsp/vscode-elixir-ls@4294f9f · GitHub) (thanks Jason Axelson)
-
New OTP 25 dialyzer settings (add support for OPT 25 dialyzer options · elixir-lsp/vscode-elixir-ls@50a8a53 · GitHub) (thanks Łukasz Samson)
-
Compile time environment variables can now be set in extension config #213 (thanks vacarsu)
-
Additional watched extensions can now be set in extension config #197 (thanks Vanja Bucic)
-
Improved unquite_slicing highlighting #221 (thanks Milo Lee)
-
Improved string interpolation highlighting #229 (thanks Milo Lee)
-
Improved regex with < highlighting #226 (thanks Tiago Moraes)
-
Extension updated to use LSP v3.16 #227 (thanks Łukasz Samson)
Houskeeping:
thanks Łukasz Samson, Thanabodee Charoenpiriyakij, Daniils Petrovs, Jason Axelson
Thanks a lot for the hard work all the contributors did!
- defmodule snippet now suggests a module name #684 (thanks Manos Emmanouilidis)
Especially this one is pure gold for me! Thanks.
Version 0.11.0 has been released
This release is smaller than the previous one but it brings important compatibility improvements. Dialyzer crash on OTP 25 is resolved and this is the first release to support elixir 1.14.
See full release notes Release Release v0.11.0 · elixir-lsp/elixir-ls · GitHub
Version 0.12.0 has been released
This time a lot of new features have landed. The biggest ones are migration to compile tracers, improved support for completions with lists, test UI integration in vscode, better support for HEEX.
A lot of small issues were fixed, along with notorious problem with build after dependences change.
See full release notes
ElixirLS elixir-ls/CHANGELOG.md at v0.12.0 · elixir-lsp/elixir-ls · GitHub
vscode extension vscode-elixir-ls/CHANGELOG.md at v0.12.0 · elixir-lsp/vscode-elixir-ls · GitHub
The patch notes mention this:
Introduction of compile tracers. ElixirLS now builds a databases basing on compile tracers API available since elixir 1.10. References provider has been rewritten to support tracer database
I’m curious to learn more about this. What features does the migration to the compile tracers API enable?
Currently there are two: references which should work faster and more reliablu and test discovery used by vscode extension to power Test UI. In the future I plan to incorporate this database in other providers to enable more consistent experience when working with not compiled source code.
Hi!
First things first - thanks for building ElixirLS!
I’m wondering what it would take to add another diagnostics provider to ElixirLS. We’ve built Gradient, a static type checker for Elixir. It’s based on Gradualizer, a similar tool for Erlang, which can be reused thanks to both languages targeting the same abstract syntax tree. Gradualizer is integrated with ErlangLS (the link points to a video, the integration is presented from 38:50 to 41:45) so it offers instant feedback in the editor of your choice.
ErlangLS comes with a plugin mechanism and a tutorial on adding diagnostics backends. I’m wondering if extensions such as new diagnostics are welcome. Is there an API similar to the one in ErlangLS? What would be the best way to add Gradient diagnostics to ElixirLS?
It’s definitely possible, please open an issue. BTW last time I checked (~2 years ago) gradualizer was completely unusable on elixir projects. I think the issues I raised are still open
Awesome, I’ll open an issue.
last time I checked (~2 years ago) gradualizer was completely unusable on elixir projects
Two years is a long time Anyway, Gradualizer itself is targeted for use with Erlang. That’s the rationale for Gradient, which is targeted for use with Elixir.
I think the issues I raised are still open.
I see only one of all four of them still being open. I think this last one is actually also solved, but let’s continue in the ticket itself.
Version 0.13.0 has been released
This release further improves experience with reloading dependencies on branch switching. It also fixes major problems introduced in v0.12.0. Completions auto aliasing experience should now be much improved. The performance issues during build should now fixed as well. Unfortunately we had to remove a code action prefixing unused variables with _ as it broke code in many cases.
I’m also happy to announce that Steve Cohen nas joined the team. He is focusing on optimisation and refactoring of elixirLS codebase.
See full release notes
ElixirLS elixir-ls/CHANGELOG.md at v0.13.0 · elixir-lsp/elixir-ls · GitHub
vscode extension vscode-elixir-ls/CHANGELOG.md at v0.13.0 · elixir-lsp/vscode-elixir-ls · GitHub
Version 0.14.0 has been released
This release brings significant improvements to variable and alias tracking, which should enhance the quality of completions, references, definitions, and signature providers. We have also improved compatibility with Mix, and the debugger now supports setting MIX_TARGET
.
The highlight of this release is the ability to run the debugger on tests directly from the Test UI. Additionally, we have changed the distribution mechanism for the VSCode extension to use Mix.install
, which should resolve many subtle issues and ensure that elixir-ls is built for the version of Elixir and OTP used in your project. In the future we plan to make it a default distribution mechanism for ElixirLS
See full release notes
ElixirLS elixir-ls/CHANGELOG.md at v0.14.0 · elixir-lsp/elixir-ls · GitHub
vscode extension vscode-elixir-ls/CHANGELOG.md at v0.14.0 · elixir-lsp/vscode-elixir-ls · GitHub
Wow. Having elixir-ls
built for the project-specific Elixir / OTP is HUGE. Spent lots of time trying to work around that issue. Looking forward for a test-drive! Thanks a lot!
Great job, @lukaszsamson!
A little hiccup here, fresh install on Windows, removed & reinstalled, deleted .elixir_ls
, still the server doesn’t like the outcome:
[Error - 7:34:57 AM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Info - 7:34:57 AM] Connection to server got closed. Server will restart.
true
[Error - 7:34:57 AM] ElixirLS - project_web_upload_demonstration client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 7:34:59 AM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Info - 7:34:59 AM] Connection to server got closed. Server will restart.
true
[Error - 7:34:59 AM] ElixirLS - project_web_upload_demonstration client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 7:35:00 AM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Info - 7:35:00 AM] Connection to server got closed. Server will restart.
true
[Error - 7:35:00 AM] ElixirLS - project_web_upload_demonstration client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 7:35:00 AM] Restarting server failed
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 7:35:02 AM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Info - 7:35:02 AM] Connection to server got closed. Server will restart.
true
[Error - 7:35:02 AM] ElixirLS - project_web_upload_demonstration client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 7:35:02 AM] Restarting server failed
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 7:35:04 AM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 7:35:04 AM] The ElixirLS - project_web_upload_demonstration server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 7:35:04 AM] ElixirLS - project_web_upload_demonstration client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 7:35:04 AM] Restarting server failed
Message: Pending response rejected since connection got disposed
Code: -32097
It’s a single-root project, nothing fancy.
I’m getting the same problem on Ubuntu 22. Also tried reinstalling the extension and deleting .elixir_ls
.