Releases: elixir-lsp/elixir-ls
Releases · elixir-lsp/elixir-ls
Release v0.17.3
v0.17.3: 24 October 2023
Fixes
- Fixed crash when language server tried to respond to cancelled requests. The bug was longstanding but changes from v0.17.2 exposed it
- Fixed crash in hover provider when markdown header cannot be formatted
- Fixed language server crash when reloading due to configuration change. The bug was longstanding but changes from v0.17.2 exposed it
- Fixed a crash when hovering over struct field access
- Fixed a dot call inference crash affecting various providers
- Workaround AST parsing crash affecting various providers
Release v0.17.2
v0.17.2: 23 October 2023
Improvements
- Better rendering of functions with many arguments in hover
- Document symbols correctly annotate ranges of last element in do-block
- ElixirLS will emit LSP and DAP telemetry events that clients can subscribe to
Fixes
- Fixed compilation error on modules using
Application.compile_env
. This problem was introduced in v0.17.0 - Fixed a problem when old diagnostics would not be cleared after server restart
Release v0.17.1
v0.17.1: 13 October 2023
Fixes
- Fixed a crash when emitting a diagnostic during file edit
Release v0.17.0
v0.17.0: 11 October 2023
Highlights
- Language Server now emit parser errors and warnings on type in .ex, .exs and .eex files
- Language Server provides better completions for elixir reserved words. Thanks Kevin Kalb for initial work
- Debugger now automatically breaks on
Kernel.dbg
macro. This allows inspecting variables, evaluating expressions and stepping through piped function calls. A settingbreakOnDbg
defaulting totrue
can be used to turn off that behaviour - Progress reports and cancel support added in debugger. This can be used to terminate long running evaluate requests.
- Improved rendering of documentation in hover provider
- Improved support for Unicode identifiers and atoms. Elixir supports Unicode identifiers since v1.5 and now all ElixirLS features should work with them
Improvements
- Added support for fish shell Sergey Kislyakov
- Consistently render parens for basic types in Suggest Contracts Code Lense and markdown
- Debugger should now be better at handling some common crashes
- Debugger now optimistically translates erlang versioned variable names to elixir names
- Debugger emits better warnings when modules cannot be interpreted
- Debugger can be launched with
"noDebug": true
. This allowsRun Without Debugging
in VSCode - Debugger will now emit exit code via
exited
DAP event. This allows tracking mix task result in debug session e.g. when running tests - New setting added to debugger
exitAfterTaskReturns
, defaulting totrue
- controls wether to end debug session when mix task returns - Language server will now reset cwd to project root after interrupted build
- All ElixirLS dependencies are now vendored and should not conflict with client project dependencies
- ElixirLS unloads deps used during startup and compilation
- *nix launch scripts has been refactored and split into dedicated bash, fish, zsh Florian Neumann
- A workaround for elixir formatter accidentally compiling the project has been implemented
- Language fences added in complete/signature/hover provided markdown fragments
- Language server stability should be improved by unloading project's applications. This works around elixir not updating application controller state after recompilation
- Completions provider is now able to suggest keyword params on macros. Previously only functions was supported
- Added
float
to list of bitstring modifiers in completions provider
Fixes
- Debugger will not allow mix task with a
/
- A bug preventing
do
completion when there's a whitespace after cursor has been fixed - Document symbol provider will not crash when unable to get selection location for AST node
- Signature provider now highlights the correct parameter in calls with default arguments when default arguments are not after required ones
- Completions now work correctly after Unicode characters
- Do not error if client returns
null
toworkspace/configuration
reverse request - Fixed a crash when getting a parameter name from complex parameter type. This bug made completions on
:pg
module fail. - Fixed invalid aliases in scope inference when a submodule
__MODULE__.Some
is used
Potential incompatibilities
- Debugger will terminate the debug session and return result code when mix task returns. Previously, debugger would continue running. If the new behavior is not wanted, please set
exitAfterTaskReturns
tofalse
in your launch configuration debugExpressionTimeoutMs
debugger launch configuration setting no longer has any effect. DAPcancel
request can now be used to terminate long running debugger evaluate requests.- Debugger will now auto break on
Kernel.dbg
macro. If this is not intended consider settingbreakOnDbg
tofalse
in your launch configuration
Release v0.16.0
v0.16.0: 19 August 2023
Highlights
- Added support for rtx version manager.
- Language server now returns diagnostics in config files for current configuration. Previously when there were compilation errors in config files an error with stacktrace would be returned on
mix.exs
instead of the config file. - Configuration management has been refactored and migrated to pull based approach. This addresses recent problem on VSCode when the server would start with default settings after a restart. Pull based
workspace/configuration
request has been added in LSP 3.6 and the pull basedworkspace/didChangeConfiguration
with params is deprecated. - Language server now uses call arity in definition, implementation, references and hover providers. This means that if there are multiple arity variants, the documentation for correct ones will be presented. In case of incomplete code all variants with arity greater or equal to the number of arguments are considered.
Improvements
- Debugger is now able to set breakpoints in multiple modules in case one line maps to many modules
- Completions provider will now trigger signature help when accepting a completion with 0-arity function when there higher arity versions available.
- Completions provider will now trigger signature help when accepting a completion with a typespec of arity greater than 0.
- Mix project modules pruning is more robust. This should address some rare crashes e.g. when
deps
directory is removed during a build. - Logger interception is more robust. This should address some rare crashes observed on elixir 1.15.
- Install script no longer unnecessarily starts and stops applications. This should improve launch time.
- On Unix systems launch script now uses
SHELL
environment variable to decide if it should prefer bash or zsh. Previously, bash was preferred. - Providers now rely on parser
token_metadata
when determining module and functions scopes. This allows for more accurate suggestions. Previous implementation was not able to provide module attribute completions inside module body when there were defs after the cursor. - Language server now provides documentation for builtin module attributes in hover and completions providers Nguyễn Văn Đức.
- Hover provider returns documentation on reserved words and variables.
- References provider is now able to find references to functions and module in current file. Previously only compiled modules were scanned for references.
- Hover provider returns simple documentation for functions, typespecs and modules from the current file. Previously nothing was returned and a crash was logged.
- Completions provider returns signatures for typespecs defined in current file.
- Improved handling of defs with default params in signature help. Now only head signature is returned.
- Language server is now able to provide signatures from behaviour or protocol in many cases.
- Definition and references provider are now able to return result on variable remote calls when variable is known to be a module.
- References provider is now able to track variable references outside of modules.
- Improved type inference when variable is reassigned.
- Providers consider local macros only after definition. This should improve correctness and reduce number of invalid completions.
- Improved handling of
alias
andrequire
withwarn:
option.
Fixes
- Fixed crash in debugger when setting a function breakpoint on not existing function
- Setting breakpoints in
Inspect
protocol implementations is now forbidden. This protocol is used internally and hitting a breakpoint resulted in deadlock. - Debugger no longer interprets
JsonV.Encoder
protocol (a vendored version ofJson.Encoder
) used internally. - Fixed a case when completions provider would return only 1 variant of a function with multiple arities.
- Completion and signature providers correctly return multiple
@spec
clauses. Previously only the first one was formatted properly. - Changing settings no longer results in notification about changed mix target.
ELS_ELIXIR_OPTS
environment variable was not correctly word split when passed to elixir command.- Fixed a crash when launching debugger with default mix task (equivalent of running
mix
). - Completions provider suggests aliased structs after
%
Nguyễn Văn Đức - Completions provider no longer returns
@@
. - Fixed a crash in completion provider when type in callback matched local without parens.
- Improved
Mix.Task
module subtype detection. Previously are submodules ofMix.Tasks
were considered. Now only ones exportingrun/1
. This error resulted in unnecessary completions. - Fixed a case when completions provider would suggest additional edit with
alias Elixir
. - Fixed a case when completions provider would suggest
Elixir.Elixir
Nguyễn Văn Đức - Correctly return
alias
subtype in completions provider when suggesting an alias. Previously module was returned even if such module does not exist. - Completions provider suggests alias for all matched module parts. Previously only first match was considered.
- Completions provider no longer suggests alias when the hint has more than one part. This means that additional edits with aliases will not be returned after
Some.Module.
. - Type of pinned variables is now correctly inferred Nguyễn Văn Đức
- Fixed AST parsing of protocol implementations without
for:
. - Fixed a case when definition provider was unable to locate variables inside multiline struct.
- Implementation provider works with macrocallback implementations.
- Fixed endless recursion when expanding
use
macro. This caused definition provider to hang when navigating toKernel
functions/macros. - Fixed rendering of docs for builtin typespecs.
- Fixed a crash with definition provider over
__MODULE__
. - Fixed a case in AST parser when
@spec
or@callback
would get overwritten. Now all definitions are collected. - Fixed rare crashes on elixir 1.15 with cursor over submodule of an attribute or variable.
- Signature provider no longer reveals details of
@opaque
typespecs. - Fixed order of signatures in completions provider.
- Fix signature render of erlang functions with multiple EIP48 documentation entries (e.g.
:erlang.system_info/1
). - Fixed render of callback signatures. Previously they were marked as
@spec
, now@callback
or@macrocallback
. - No parens locals are no longer treated as calls on elixir 1.15+.
- Fixed cases when crash in AST parser would produce invalid metadata.
- Fixed crash in completions with nested dot expression on elixir 1.15.
- Fixed AST parsing when
quote
was used as variable.
Potential incompatibilities
- The language server will get configuration
workspace/configuration
if the client supports it. Previously it relied onworkspace/didChangeConfiguration
notification.
Release v0.15.1
Improvements
- This is the first release supporting OTP 26. Unfortunately due to bugs in OTP only 26.0.2+ is supported. See 886 and 923 for details
Fixes
- Fixed crash when handling
workspace/didChangeWatchedFiles
whenproject_dir
not yet set - ExUnit test tracer is now under build lock. This should fix crashes due tu race conditions
- Fixed completion of remote calls matching locals without parens (e.g.
Map.drop
whendrop
is local without parens fromecto_sql
) Milo Lee
Release v0.15.0
Improvements
- This is the first release supporting Elixir 1.15. See 898 for details
- Main distribution mode switched to
Mix.install
script. This allows running ElixirLS built with a correct combination of OTP and elixir. Previously used.ez
releases suffered from numerous problems stemming from version incompatibilities (e.g. 193) - elixir_sense replaced many of its custom source parsing internals with elixir 1.13+ Code.Fragment APIs
require
andimport
are now understood by elixir_sense. This improves accuracy of definition, hover, references and complete providers. For example only imports matchingonly
andexcept
options will now be suggested by complete provider.- When accepting a completion with a not required macro a
require
directive will be now added to module. - Reimplemented
use
macro expansion. This should improve accuracy. - Better handling of typespecs in elixir_sense. This should improve accuracy in modules with defs and types sharing the same name.
- Added ability to pass command line options to elixir and erlang via
ELS_ELIXIR_OPTS
andELS_ERL_OPTS
. This allows for setting a node name and connecting remotely to language server and debugger.
Fixes
- Fixed a longstanding bug with formatter not respecting
.formatter.exs
when code is compiling (requires elixir 1.15) Thomas Depierre - Fixed invalid alias handling with submodules
Breaking changes and deprecations
- Elixir 1.12 is no longer supported
.ez
archive based distribution is now deprecated
Release v0.15.0-rc.3
Release v0.14.6
Improvements
- added option
elixirLS.autoInsertRequiredAlias
controlling if complete provider
will auto insert aliases Zeke Dou
Fixes
- Pin elixir_sense, dialyxir and jason versions to ensure compatibility
- Reduce long file names. This should fix compilation issues on some filesystems
- Fixed crash in dialyzer
Release v0.14.5
Fixes
- Fixed regression in debugger not respecting
MIX_ENV
andMIX_TARGET
- Silence output from
dialyxir
making client disconnect from the server on elixir < 1.14 - Avoid serializing PID to JSON