Releases: lexical-lsp/lexical
v0.7.3
Support Elixir 1.18 (#849) 1.18 support. Updated elixir_sense to support 1.18. Noticed some slowdowns pertaining to the version checks we do internally, so I cached them in persistent_term, since the erlang or elixir versions can't change while the VM is running. Co-authored-by: scohen <[email protected]>
v0.7.2
Prep for 0.7.2 release (#842) * Prep for 0.7.2 release * Updated credo to fix spurious error * Update Nix hash of Mix deps * Fixed dialyzer error * Downgraded elixir_sense because _of course_ * Update Nix hash of Mix deps --------- Co-authored-by: scohen <[email protected]>
v0.7.1
Upgrade elixir_sense (#812) Elixir sense was doing a compile-time check for a certain feature, and since Lexical is built on an older version of elixir than it often runs on, the check ended up being wrong. We submitted a PR to elixir_sense and now can fix the bug.
v0.7.0
v0.7.0
We're releasing 0.7 so we can support Elixir 1.17 and Erlang 27. However, those users on Erlang 27 will experience large increases in the amount of memory Lexical takes up due to this bug. When that bug is fixed, we'll push out another release that will detect the newer version of Erlang and things should go back to normal.
Other than supporting the newer versions of Erlang and Elixir, we've added the following features:
Features
- Organize aliases code action. When invoked, will alphabetize and flatten all your existing aliases in a module. It will also put all aliases in the same place in a module.
- Remove unused alias code action
- Add alias code action: Type a module, invoke the code action and see a list of modules to alias, select one, and it's added to your module's other aliases.
- Improved script handling: Now lexical won't execute scripts when editing them. Thanks, @zachallaun!
- We now show typespecs for struct field completions. Thanks @kirillrogovoy
Bug Fixes
- Fixed crash when typing text that isn't elixir code
What's Changed
- Alias range by @scohen in #715
- Fixed two bugs with alias calculation by @scohen in #726
- Stopped passing the server project over to remote_control by @scohen in #731
- Organize aliases by @scohen in #725
- Refactor: Pass env into completion in remote control by @scohen in #733
- Refactor: Increased type detail by @scohen in #734
- Fix: Edge case for module loading by @scohen in #738
- Improved store error handling by @scohen in #737
- Complete callables without parens if present in locals_without_parens by @zachallaun in #739
- Indexed delegated functions by @scohen in #729
- Added safe_split to Ast.Module by @scohen in #743
- Fix: Crash when typing english by @scohen in #742
- Returns two definitions for delegate function's definition by @scottming in #744
- Fix go to definition behavior for same-name, same-arity functions by directing to the first function by @scottming in #746
- Completion: show type spec for struct fields by @kirillrogovoy in #751
- Code Action: Add alias by @scohen in #740
- Fixed: Go to definitions crashes on modules defined via a macro by @scohen in #753
- Increased plugin timeouts by @scohen in #757
- Proxy for expensive API requests by @scohen in #736
- Code Action: Remove unused aliases by @scohen in #748
- Upgraded sourceror 1.0.3 -> 1.2.1 by @scohen in #759
- Reorder
test
macro completions by @zachallaun in #769 - Track uses and requires by @scohen in #756
- Added struct definition detection for ecto schemas by @scohen in #758
- Sorted bang functions after non-bang variants by @scohen in #770
- Updated changelog by @scohen in #771
- Implement
Position.compare/2
by @zachallaun in #767 - Elixir 1.17 by @scohen in #760
- Minor housekeeping by @Moosieus in #784
- Update nix by @akirak in #785
- Update sourceror in common and server by @Moosieus in #789
- Handled formatting invalid module names by @scohen in #781
- Simplify and co-locate more completion abstractions in server by @zachallaun in #776
- Simplifications in
remote_control
by @zachallaun in #778 - Refactor request handling by @zachallaun in #777
- Fix: give proper argument to
TaskQueue.add/2
in Server.handle_message by @bangalcat in #791 - handle other cases where project node goes down by @Moosieus in #790
- Fix crashes on OTP 27 by disabling ETS table compression by @zachallaun in #796
- Completion: don't insert impl attribute if it's already present by @zachallaun in #801
New Contributors
- @kirillrogovoy made their first contribution in #751
- @akirak made their first contribution in #785
Full Changelog: v0.6.1...v0.7.0
What's Changed
- Alias range by @scohen in #715
- Fixed two bugs with alias calculation by @scohen in #726
- Stopped passing the server project over to remote_control by @scohen in #731
- Organize aliases by @scohen in #725
- Refactor: Pass env into completion in remote control by @scohen in #733
- Refactor: Increased type detail by @scohen in #734
- Fix: Edge case for module loading by @scohen in #738
- Improved store error handling by @scohen in #737
- Complete callables without parens if present in locals_without_parens by @zachallaun in #739
- Indexed delegated functions by @scohen in #729
- Added safe_split to Ast.Module by @scohen in #743
- Fix: Crash when typing english by @scohen in #742
- Returns two definitions for delegate function's definition by @scottming in #744
- Fix go to definition behavior for same-name, same-arity functions by directing to the first function by @scottming in #746
- Completion: show type spec for struct fields by @kirillrogovoy in #751
- Code Action: Add alias by @scohen in #740
- Fixed: Go to definitions crashes on modules defined via a macro by @scohen in #753
- Increased plugin timeouts by @scohen in #757
- Proxy for expensive API requests by @scohen in #736
- Code Action: Remove unused aliases by @scohen in #748
- Upgraded sourceror 1.0.3 -> 1.2.1 by @scohen in #759
- Reorder
test
macro completions by @zachallaun in #769 - Track uses and requires by @scohen in #756
- Added struct definition detection for ecto schemas by @scohen in #758
- Sorted bang functions after non-bang variants by @scohen in #770
- Updated changelog by @scohen in #771
- Implement
Position.compare/2
by @zachallaun in #767 - Elixir 1.17 by @scohen in #760
- Minor housekeeping by @Moosieus in #784
- Update nix by @akirak in #785
- Update sourceror in common and server by @Moosieus in #789
- Handled formatting invalid module names by @scohen in #781
- Simplify and co-locate more completion abstractions in server by @zachallaun in #776
- Simplifications in
remote_control
by @zachallaun in #778 - Refactor request handling by @zachallaun in #777
- Fix: give proper argument to
TaskQueue.add/2
in Server.handle_message by @bangalcat in #791 - handle other cases where project node goes down by @Moosieus in #790
- Fix crashes on OTP 27 by disabling ETS table compression by @zachallaun in #796
- Completion: don't insert impl attribute if it's already present by @zachallaun in #801
- Completion: Use existing specs to infer function signatures and vice-versa by @zachallaun in #802
- Don't run top-level code in
.exs
files by @zachallaun in #798 - Use non-deprec...
v0.6.1
v0.6.0
After multiple people asked, both document and workspace symbols have been implemented.
Both make heavy use of our indexing infrastructure, which provides extremely fast and
accurate results.
We've also fixed a number of small inconsistencies and crashes in the indexer, making it more robust and accurate. I especially want to call out the fix that @lukad made, that improved indexing performance by 3600x on his large codebase.
When you update to this release, we strongly recommend re-indexing your project's source code by opening the project's mix.exs
file and
running the Rebuild <your project>'s code search index
code action.
In addition, we've improved support for completions in phoenix controllers, stopped completions inside strings and have changed how we sort completions. The new sorting scheme is a big improvement for usability, and sorts things by how "close" they are to what you're working on. Give it a shot, we think you'll like it.
I'd like to thank all our new contributors, and especially our core team of
@scottming, @zachallaun, @Moosieus and @blond. You've all gone above and beyond.
What's Changed
- Added path tests by @scohen in #630
- Added variable extractor and ability to customize which extractors run by @scohen in #621
- Add Sublime Text instructions to docs by @distefam in #633
- Refactor search store queries
exact/2
andfuzzy/2
for simplicity by @scottming in #631 - Create FUNDING.yml by @scohen in #634
- Add a glossary by @zachallaun in #354
- Add prefix search functionality to the search store by @scottming in #632
- Implement callback completions by @Moosieus in #640
- Fix
do
completing todefmodule
in VSCode by @Moosieus in #642 - Speed up indexing by not calling
deps_dir
for every file by @lukad in #646 - Fixed bug where blocks weren't popped correctly by @scohen in #647
- Fix crashing in unsaved vscode files by @Moosieus in #644
- Upgrade dialyzer for Elixir 1.16 by @scottming in #650
- Find references for variables by @scohen in #645
- Add summaries to callable completions. by @Moosieus in #648
- New completion sorting approach by @Moosieus in #653
- Slimmed down representations of range and position by @scohen in #654
- Fixed issue where function definitions were returning references by @scohen in #655
- FIX: Invalid reads for requests that contain multi-byte characters by @scohen in #661
- Document Symbols support by @scohen in #652
- Use
languageId
field provided by LSP clients. by @Moosieus in #662 - Extract module reference in function captures by @scottming in #663
- Fix: Current module not identified in defimpl by @scohen in #665
- Fix links on architecture page. by @Moosieus in #669
- Patch
DidOpen
handler. by @Moosieus in #671 - Added extractors for defimpl and defprotocol by @scohen in #666
- Fixing crash when dealing with unicode files by @scohen in #672
- Handled comments when resolving locations by @scohen in #670
- Fix: Non-string test names crash exunit indexer by @scohen in #676
- Granted write permissions by @scohen in #677
- Fix: Function definition extractor chokes on macro functions by @scohen in #682
- chore: update Nix workflow to not return error by @hauleth in #683
- Added module attribute detection by @scohen in #679
- Impl suggest behaviours by @scohen in #681
- Log errors in Server.Transport.StdIO. by @Moosieus in #684
- Support resolving Phoenix Controller modules. by @scottming in #659
- Completions: Handled nil origin and full name by @scohen in #689
- Fixed crash for in-progress module attributes by @scohen in #691
- Fixed: Error while calculating block spans by @scohen in #687
- For module definitions, use the
Indexer
version instead ofElixirSense
by @scottming in #658 - Fix disabling HEEx as-you-type compilation. by @Moosieus in #694
- textDocument/definition: respond with nil result when not found by @zachallaun in #698
- Ensure the index is ready before running GoToDefinition tests by @zachallaun in #700
- Current modules can be nil by @scohen in #696
- Stopped completions inside strings by @scohen in #692
- Workspace symbols by @scohen in #674
- Added def/defp to document symbols for functions by @scohen in #702
- Fix: Module suggestion was incorrect for files with multiple periods by @scohen in #705
- Added a changelog by @scohen in #706
- Fallback to
ElixirSense
when unable to find any definitions with Indexer by @scottming in #707 - chore: update FOD hash by @hauleth in #709
- chore: update Nixpkgs by @hauleth in #714
- Included non-deps symbols in fuzzy matcher by @scohen in #704
- Added boost for matches directly following the last period by @scohen in #708
New Contributors
Full Changelog: v0.5.2...v0.6.0
v0.5.2
Bugfix release
This release fixes the code action that replaces unused variables with underscored versions. It was inadvertently broken when we introduced support for elixir 1.16.
What's Changed
- Updated credo by @scohen in #617
- Update nix hash with new deps by @hauleth in #618
- Prepare scripts for updating Nix hash by non-Nix users by @hauleth in #619
- Update the installation documentation for the supported Elixir version by @scottming in #624
- Fixed unused variable code action by @scohen in #628
Full Changelog: v0.5.1...v0.5.2
v0.5.1
v0.5.0
Admittedly, it's been a long while since the last release, but we've laid the groundwork for some exciting new features.
Since November, we've built out our search and indexing infrastructure that allows lexical to find interesting bits of your source code and highlight them for you later. We went through five separate backends before settling on one that is super duper fast, memory efficient(ish) and is written in pure elixir.
Presently, we're using this to power our newest features, find references and go to definition. We've implemented both for modules, module attributes and functions. You'll notice that when lexical starts, it will index your project's source code. This is a one-time operation that should be quick, indexing lexical's and its dependencies 193,000 lines of source code takes around 10 seconds. This means that indexing is on by default, and there's no way to turn it off any more. We've crossed the rubicon, folks, and there's no turning back.
Other good news, because of the indexing infrastructure, we no longer have to do a full build when lexical starts for the first time. This means the startup time has dramatically improved. On the lexical project, it has dropped from 12 seconds to 2.
I'd like to thank @scottming @zachallaun and @Blond11516 for ensuring that the current state of the code is where it is today. Also, thank you @hauleth for taking care of the nix flake.
And we've made a ton of bug fixes and usability improvements since 0.4.1 as well. Some highlights include:
- Support for elixir version 1.16
- Handled renaming of
rtx
tomise
- Multiple improvements to the hover popup
- Improved ease of writing new code actions
- Undefined variables diagnostics error for HEEx templates
- Code action: Suggested function names
- Completions for typespecs
- Improved nix flake
What's Changed
- Correctly activate rtx during boot by @zachallaun in #430
- Improve incompatible version errors on boot by @zachallaun in #389
- i96: send and log messages by @jollyjerr in #420
- Put module below call signature for hover funs/types by @zachallaun in #434
- Fix diagnostics issue when
config_env
is called. by @scottming in #439 - Find References by @scohen in #405
- Code Actions refactor by @scohen in #453
- Consider arity in function ordering by @yerguden in #442
- Fix: Erlang function calls in pipes were incorrectly formatted by @scohen in #476
- Fix: Stutter when completing inside string interpolations by @scohen in #464
- Fix: Don't raise an exception if the build directory doesn't exist by @scohen in #481
- Add Vim ALE configuration details by @jparise in #484
- Removed unhelpful completion for :: symbol by @mdshamoon in #485
- Add heex to filetype list for neovim by @soundmonster in #487
- Added completions for typespecs by @scohen in #478
- Fix module completion error after a dot by @zachallaun in #496
- Add replacing unknown remote function to code actions by @sheldak in #443
- Move from flake-utils to flake-parts by @hauleth in #498
- Fix Diagnostic.Result to_lsp with 4-elem tuple position by @bangalcat in #502
- Optimise the manual loading of dependent apps and modules. by @scottming in #455
- Add instructions for LunarVim installation by @dimitarvp in #510
- Find function references by @scohen in #516
- Added percentage based progress reporters by @scohen in #519
- Added reindex command by @scohen in #522
- Support mise (new name for rtx) by @x-ji in #544
- Correctly applied code lens options by @scohen in #553
- Support Elixir 1.16 by @scottming in #535
- chore(nix): update deps hash by @hauleth in #557
- Resolve function definitions without parens by @zachallaun in #563
- Correctly resolve imported calls by @zachallaun in #565
- Implemented find references for module attributes by @scohen in #558
- Correctly resolve
&Module.function/arity
syntax by @zachallaun in #566 - Switched over to mise rather than rtx by @scohen in #580
- Struct discovery now uses the index by @scohen in #582
- Detected module references using MODULE by @scohen in #603
- Bumped garbage collection for some of our more intensive processes by @scohen in #600
- Calling find references on a
defstruct
call finds defined structs by @scohen in #607 - Zipped package now keeps file permissions by @scohen in #609
- Excluded source files in build directory by @scohen in #610
New Contributors
- @jollyjerr made their first contribution in #420
- @yerguden made their first contribution in #442
- @jparise made their first contribution in #484
- @mdshamoon made their first contribution in #485
- @soundmonster made their first contribution in #487
- @sheldak made their first contribution in #443
- @bangalcat made their first contribution in #502
- @dimitarvp made their first contribution in #510
- @x-ji made their first contribution in #544
Full Changelog: v0.4.1...v0.5.0
v0.4.1
This is a small bugfix release for 0.4.0
It contains the following fixes:
- Fix: Stutter when completing some items inside strings (
:erl
would complete to:erlerlang
) - Fix: Undefined variable names in HEEX templates
- Fix: Erlang remote calls in pipelines did not have their first parameter removed during completion
- Feature: Function names in completions are ordered by name and then arity