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