Skip to content

Releases: elixir-lsp/elixir-ls

Release v0.19.0

21 Jan 18:28
Compare
Choose a tag to compare

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 former rtx 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 from mix.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 config taskArgs
  • 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 as keyword and every completion having a snippet was labelled as snippet.
  • 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

27 Dec 23:25
Compare
Choose a tag to compare

v0.18.1: 28 December 2023

Improvements

  • Variables defined in ex_unit test, setup and setup_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

22 Dec 19:05
Compare
Choose a tag to compare

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 on languageId document property
  • On type formatting and Folding ranges providers are now disabled on eex documents as eex 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 to debug_adapter to better reflect that it is not a debugger but an adapter implementing Debug Adapter Protocol. Similarly, the launch scripts has been renamed to debug_adapter.sh and debug_adapter.bat respectively. Editor extensions and custom launcher scripts may need an update

Release v0.17.10

19 Nov 22:27
Compare
Choose a tag to compare

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

13 Nov 21:22
Compare
Choose a tag to compare

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

Release v0.17.8

09 Nov 19:21
Compare
Choose a tag to compare

v0.17.8: 9 November 2023

Improvements

  • Added compatibility warning on OTP 26 and Windows
  • Raise more filesystem related errors to user. The server will now refuse to start if it cannot create its files in .elixir_ls directory

Fixes

  • Fixed crash in completions when local function accidentally fuzzy matches sigil_ prefix
  • Workaround for elixir crash when fetching docs and cwd is nil
  • Fixed crash in completions with invalid struct module
  • Fixed crash in completions when __struct__ cannot be evaluated
  • Fixed crash in hover when inspecting not know metadata
  • Fixed crash in test code lense when describe block cannot be found
  • Fixed crash in debugger when process exits or continues during async variables retrieval
  • Fixed crash when publishing diagnostics and stacktrace entries does not specify file
  • Fixed crash in build when the server tries tu purge and recompile project and it is not currently loaded

Release v0.17.7

06 Nov 15:17
Compare
Choose a tag to compare

v0.17.7: 6 November 2023

Fixes

  • Fixed issue in formatter not being able to format files in non mix projects
  • Fixed language server crash when unable to suggest contracts
  • Fixed language server when handling delete file notification and tracer is not behaving correctly
  • Fixed crash in completions when defoverridable refers to delegated function
  • Fixed crash in type inference engine related to invalid handling of Map functions arguments
  • Fixed crash in completions when overridable function has non trivial parameters
  • Added missing clauses handling function call expansion in type inference engine

Release v0.17.6

02 Nov 18:30
Compare
Choose a tag to compare

v0.17.6: 2 November 2023

Improvements

  • Bring back partial support for elixir 1.12. Note that it's best effort and not all features will work
  • Directory issues with fish launch script fixed Jamin Thornsberry
  • RTX activation in launch script now uses env -s instead of activate Walton Hoops
  • Language server is now more resilient when cwd changes. Workaround added for elixir issue when Path.expand would unnecessarily evaluate File.cwd!
  • Tracer should now be able to recover when DETS files are corrupted
  • elixir_sense plugin crash is now handled and should not prevent completions

Fixes

  • Fixed crash in debugger when on_load fails during module interpreting
  • Fixed crash in completions due to missing regex escapes
  • Fixed crash in document symbols on invalid typespec
  • Fixed crash in test code lense when test block cannot be found
  • Launch script properly uses custom Mix.install. This error made it fail on elixir 1.16. Not e that elixir 1.16 is not yet supported
  • Fixed crash in type inference incorrectly matching on typespec with arguments
  • Fixed crash in completions when callbacks from typespecs do not match those from docs

Release v0.17.5

31 Oct 11:00
Compare
Choose a tag to compare

v0.17.5: 31 October 2023

Improvements

  • Invalid environment variables config is now raised as message. Previously it would crash the server
  • Compile tracer is more error tolerant. It should now handle invalid DETS files and missing directories
  • Dialyzer is more error tolerant - it should now be able to recover from broken beam files on elixir 1.14+

Fixes

  • Fixed crash when mix is unable to load deps. Loading of deps should now emit diagnostics
  • Fixed crash in complete when editing a map/struct
  • Fixed a crash in parser on untitled: schema files
  • Fixed a crash when emitting diagnostics and cwd is not present

Release v0.17.4

30 Oct 13:03
Compare
Choose a tag to compare

v0.17.4: 30 October 2023

Improvements

  • Dialyzer will now store beams in separate directories for each elixir/OTP combo. This should limit number of errors due to beam errors
  • Debugger will now use current directory if projectDir is not set. This makes it easier to setup in folderless configuration

Fixes

  • Fixed complete crash with non Unicode characters
  • Fixed hover crash with functions with no args
  • Fixed complete crash when one of the apps gets unloaded
  • Fixed complete crash when struct/map has non atom keys
  • Fixed complete crash on non keyword import options
  • Fixed crash when type was incorrectly recognized
  • Fixed hover crash due to system limit
  • Fixed fish shell init script to work with paths containing whitespace Julia
  • Document symbols handle some more cases of invalid AST
  • Language server is now more careful with current directory. It should make it more stable when project dir cannot be changed into
  • Various cases of current directory usage fixed. This should improve stability during build when cwd changes
  • All references to Mix.Project moved under a build lock or made go through cache. This should improve stability during build when Mix.Project stack changes
  • Fix error prone usages of String.starts_with? as a way of checking if file is in directory
  • Language server made more stable with autoBuild disabled