Releases: elixir-lsp/elixir-ls
Releases · elixir-lsp/elixir-ls
Release v0.21.3
v0.21.3: 22 May 2024
Improvements
- Reuse incremental dialyzer PLT when suggesting specs
- Avoid starting both incremental and old dialyzer
Fixes
- Properly clean up incremental dialyzer PLT when a new one is loaded
Release v0.21.2
v0.21.2: 21 May 2024
Improvements
- Improved validation of dialyzer options. Previously invalid options were allowed leading to dialyzer crashes
Fixes
- Fixed a crash in incremental dialyzer leading to used memory buildup
Release v0.21.1
v0.21.1: 8 May 2024
Fixes
- Fixed endless loop when expanding incomplete
use
macro - Fixed crash in incremental dialyzer when dialyze is already in progress
- Fixed crash when rendering metadata to markdown
Release v0.21.0
v0.21.0: 5 May 2024
Highlights
- OTP incremental dialyzer is now the default dialyzing engine on OTP 26+. While slower than ElixirLS dialyzer it is much better at tracking module dependencies and should resolve issues with transient dialyzer warning that do not disappear on recompile. ElixirLS dialyzer is still available and incremental dialyzer can be disabled by config setting
elixirLS.incrementalDialyzer
- Experimental support for Code actions added. Two code actions are available: Replace unknown remote def, replace an unused variable with an underscore Samuel Heldak
Improvements
- Added a workaround for ExUnit emitting invalid event in case
setup_all
is killed. This error resulted in invalid test results being presented in Test UI - More apps is now unloaded on recompile. This should improve build consistency
- Underscored variables are now returned in completions and tracked
- All provider code has been moved to ElixirLS repo from elixir_sense. This should make it easier for contributors to navigate in the codebase
Fixes
- Fixed a crash in on-type formatting
- Fixed a crash on invalid diagnostic severity emitted by compiler
- Fixed a crash in parser related to race conditions
- Fixed a crash in debugger when only 1 frame was returned
- Fixed selection ranges incompatibility with elixir 1.16.2
- Fixed a crash when logging elixir API error AJ Foster
- Fixed a crash in type inference engine related to map keys
Potential incompatibilities
- elixir_sense plugin management code has been moved to ElixirLS repo along with all providers. This can potentially affect existing plugins
Release v0.20.0
v0.20.0: 21 February 2024
Highlights
- Selection ranges provider added. This provider handles expand/shrink selection editor commands in a semantic aware way
- Completions, hover and signature help providers now are able to display
@doc
and other attributes data from the currently edited buffer - Hover provider now returns markdown with working links to hexdocs and erlang documentation. Support for ExDoc autolinking and erlang see tags has been added
Improvements
- Completions provider renders metadata about returned items. Metadata includes info on
since
,deprecated
,impl
attributes as well as a number of other flags (hidden, optional, opaque, overridable etc.) - Completions provider is now able to suggest callbacks and protocol functions defined in the current buffer
- Completions provider is now able to suggest return values when implementing callbacks and protocol functions defined in the current buffer
- Documentation and signatures is provided on builtin function in more cases
- Avoid race conditions when reading mix project in workspace symbols provider
- Avoid a crash in document symbols provider when unable to determine the end of expression
- Avoid a crash when
locals_without_parens
contains invalid elements - Improved resilience of alias expander
Fixes
- Hover provider would emit invalid markdown when it contained escaped
#
and links with anchor - Fixed a crash in workspace symbols provider when the directory is no longer a mix project
- Workaround an issue when elixir compiler would emit a diagnostic with invalid Unicode
- Fixed a crash when
Mix.env
cannot be retrieved - Fixed a crash in spec code lens on protocol def with default arguments
- Added a workaround for a crash when reading module exports while it is being compiled
- Fixed a crash when formatting an atom argument
- Fixed a crash when handling an invalid typespec
- Fixed a crash when in complete provider when unable to expand a phoenix controller
Release v0.19.0
v0.19.0: 21 January 2024
Highlights
- On type parsing and diagnostics for phoenix
.heex
files - Workspace symbols provider has been reimplemented. Previously the workspace symbols index was build from all available symbols. To make it more focused and helpful now only symbols from the project are considered. This change made it much quicker and improved the quality of returned results. Fuzzy matching engine was also improved and made consistent with how complete provider works.
Improvements
- Parser is now asynchronous. This should limit the number of cases when providers wait on parsing.
- Function location in workspace symbols provider is optimized. Index build speed should now be much quicker
- Added support for
mise
version manager (the formerrtx
is still supported) - Robson Roberto Souza Peixoto - Workspace symbols provider return results on empty query
- Workspace symbols provider no longer returns duplicated results for functions with default arguments
- Workspace symbols provider now returns
containerName
if applicable - Workspace symbols provider now returns deprecated symbol tag
- Workspace symbols provider, completions and other providers return distinct symbol kinds for functions and macros. This makes them visually different in editors (e.g VSCode uses different icons)
- Apps are now reloaded after build so application controller can provide an accurate list of modules. This works around elixir-lang/elixir#13001
- App config is now reset on each build. This works around elixir-lang/elixir#13246
- Suggest contracts calls are now non blocking. Previously a call to dialyzer would block the server.
- Diagnostics without
file
set will now be returned as originating frommix.exs
. Diagnostics without document URI are meaningless in LSP - Document symbols rendering is improved for defs with multiline arguments - Milo Lee
- Debugger now respects
--no-mix-exs
flag in launch configtaskArgs
- Do block indentation level discovery is improved in completions provider. This should improve keyword completions position
- Elixir version checks have been optimized in completions provider. Those turned out to be expensive.
- Completions provider now caches modules. This greatly improves responsiveness when completion is invoked off an empty hint
- Completions provider now returns
@nifs
attribute added in elixir 1.16 - Definitions provider now supports resetting aliases
alias: nil
on phoenix router scope
Fixes
- Fixed crash when code action is unable to apply spec
- Fixed a crash when loading an old format or unrepairable DETS file
- Operators, functions and macros are now correctly labelled in completions provider. Previously every symbol from
Kernel
was labelled askeyword
and every completion having a snippet was labelled assnippet
. - Fixed a crash in build when printing invalid diagnostics from external compilers
- Fixed a crash in suggest contracts when dialyzer is able to infer concrete types in protocol
- Fixed a crash in completions provider when a completion would be filtered out
- Fixed a crash in document symbols provider when unable to get a line for AST node
- Mix clean custom command will no longer crash when executed in non mix project
- Completions provider returns correct type when a module has functions and macros with the same name. This bug made it return
Application.compile_env
as function instead of macro - Fixed a crash in phoenix router scopes when code fails to parse
- Fixed a crash in definitions provider when cursor over phoenix controller action in router
- Fixed a crash in definitions provider with nested phoenix scopes. The scope combination algorithm was incorrect and produced invalid aliases
Release v0.18.1
v0.18.1: 28 December 2023
Improvements
- Variables defined in
ex_unit
test
,setup
andsetup_all
context are now returned by completions provider. Navigation to variable definition and references now also works correctly - Suggest spec code lens now emits specs for all arity variants when function has default arguments. Previously only the one with all parameters was emitted
- Missing required OTP
:crypto
module is now detected on startup - Completions provider is now properly returning quoted remote calls. Previously accepting a suggestion would insert invalid code
Fixes
- Fixed regression and crash on
phoenix-heex
files. This problem was introduced in v0.18.0 and broke completions, definition and hover - Fixed a crash during struct field inspection when the struct cannot be instantiated
- Fixed a crash in implementations provider when behaviour implementation is a delegate or a guard
- Fixed a crash on invalid delegate AST node
- Fixed a crash when incorrect AST resulted in mismatched alias stack pop operations
- Fixed a crash on older elixir versions when compiler diagnostic message is not a binary. This problem was introduced in v0.18.0
- Fixed invalid argument passed to fallback implementation for Apply spec code action
- Workspace symbols provider now correctly navigates to functions with default arguments
Release v0.18.0
v0.18.0: 22 December 2023
Highlights
- Elixir 1.16 support
- Diagnostics provider now returns related info with code positions. This feature works best with elixir 1.16 allowing for navigation to invalid syntax elements like mismatched brackets
- On type parser has been improved and extended. It now keeps a cache of parsed AST and extracted document metadata. Most of the providers has been updated to reuse this metadata eliminating the need for on demand parsing. This should make completions, hover, etc more snappy. The previous implementation was particularly not efficient for completions provider that would parse the file twice for each request
- Phoenix integration improved. Go To Definition can now navigate to controllers when inside a Phoenix scope. Complete suggestions in Phoenix.Router now return controllers and actionsGustavo Aguiar
Improvements
- Diagnostic provider returns deprecated and not used tags on certain warnings. This allows editors for visually marking code ranges using deprecated APIs and not used code constructs
- Diagnostics are now stored along with document version. Diagnostic publishing algorithm has been improved to prefer recent parser diagnostics over stale build diagnostics.
- Parser is now able to provide diagnostics in
untitled:
schema files based onlanguageId
document property - On type formatting and Folding ranges providers are now disabled on
eex
documents aseex
was never supported in those providers - OTP 26 compatibility warning on Windows updated to direct users to install 26.2+ version
- Struct field completions now work on functions returning remote type sarah kate
- Type inference from guard expressions added Nguyễn Văn Đức
Fixes
- Fixed crash in document symbols provider on invalid attribute nodes
- Fixed crash on cases where some compiler generates diagnostics with invalid position
- Fixed test lense provider on code using
Elixir
proxy - Fixed debugger crash when stacktrace frame returns
undefined
instead of arguments list - Improved LSP compatibility on document synchronization. Previously the document version after applying changes was increased. This bug was present since the initial code release but started causing issues with discarded diagnostics in Helix editor since v0.17.0 started publishing diagnostics with document version
- Fixed invalid result returned from build process when handling error during project reload
Potential incompatibilities
elixir_ls_debugger
app has been renamed todebug_adapter
to better reflect that it is not a debugger but an adapter implementing Debug Adapter Protocol. Similarly, the launch scripts has been renamed todebug_adapter.sh
anddebug_adapter.bat
respectively. Editor extensions and custom launcher scripts may need an update
Release v0.17.10
v0.17.10: 19 November 2023
Improvements
- Improved validation of language server configuration
- Improved validation of debugger launch configuration
- Diagnostics with no file are now emitted on
mix.exs
. Previously they were skipped - Debugger emits better error messages when launch configuration is invalid
- Language server made more predictable on critical errors (e.g. project directory no longer existing)
Fixes
- Fixed crash when callback from docs cannot be matched with callbacks from typespecs
- Fixed invalid expansion of
Enum.fetch
in type inference engine - Handled a few cases of invalid unicode binaries
- Fixed crash in debugger when stacktrace frame cannot be fetched
- Increased timeout on variable evaluation
- Fixed crash in debugger when inspecting an improper list
- Fixed crash in debugger when reloading test modules and
:code.delete/1
fails
Release v0.17.9
v0.17.9: 13 November 2023
Improvements
- Capitalized map keys are no longes suggested in completions. Such keys result in invalid alias expression
- Completions should be able to infer struct and map keys in more cases when variable is a result of function returning struct or map
- ElixirLS will refuse to start if unable to create its files. This should limit the number of cases when server starts in faulty state
Fixes
- Fixed crash in completions when attribute expands to atom not being an elixir module
- Fixed crash in completions when map has capitalized atom keys
- Fixed crash on invalid alias expressions
- Fixed crash when suggestion a variable that is known to be a struct
- Removed 5s timeout on writing debugger output. This led to crashes under heavy load
- Fixed language server crash when diagnostic use
IO.chardata
file location