Move elixir_sense to elixir-lsp and dialyxir to current.#10
Merged
Conversation
lukaszsamson
added a commit
that referenced
this pull request
Jun 6, 2026
Replaces the earlier narrow engine patch with a faithful port of the whole
complete-merges completion refactor, reconciled against 1.20's elixir_sense
(b8362663, a 137-commit-newer descendant of complete-merges' f248030e) and
1.20's GenLSP completion.ex.
Engine (apps/elixir_ls_utils/lib/completion_engine.ex): taken from
complete-merges verbatim, then NormalizedCode.Fragment -> Code.Fragment
(the shim is gone; stdlib Code.Fragment covers it on 1.16+). Brings:
- alias_only/6 wired into the {:dot,...} case: alias/import/require and
alias __MODULE__. complete to modules only (upstream b59907eb).
- NormalizedMacroEnv.expand_alias-based value_from_alias / simple_expand /
expand_struct_module (replaces Source.concat_module_parts, which
elixir_sense marks 'TODO remove').
- expand_struct_module cases for __aliases__, __MODULE__, module attributes,
and match-context %var{} (incl. upstream #14308 __MODULE__-struct fix).
- container_context (map/struct field + bitstring modifier) via
Code.Fragment.container_cursor_to_quoted; map-update simple_expand path.
- hint/exact-filtered get_module_funs/4 + get_metadata_module_funs/7
(upstream 1.20 memory/filtering improvements #15140/#15143).
- default_args + needed_import(all-arities) output shape (replaces def_arity).
- {:block_keyword_or_binary_operator, _} (Elixir 1.18+) handled (returns
empty; block keywords come from the LSP layer's maybe_add_do/keywords).
Reducers + suggestion.ex: complete_engine.ex passes full text_before to the
engine and routes struct_field/bitstring_option groups; record.ex and
type_specs.ex (variable-module expand, #10) taken from complete-merges;
struct.ex and bitstring.ex deleted (folded into the engine).
LSP completion.ex (kept on GenLSP): maybe_reject_derived_functions rewritten
to expand default-arg variants from default_args; :field clause reads
summary/metadata optionally so engine-sourced struct/map/record fields match.
Ecto query plugin: get_module_funs/4 call + pattern updated to the new
one-entry-per-macro tuple shape (complete-merges left this calling the
nonexistent 2-arg form).
Tests: complete_test.exs + suggestions_test.exs ported from complete-merges
and adapted for OTP28 (:group->:category, source_anno) and Elixir 1.20
(fn-empty-rhs warning removed, record metadata fields). completion_test.exs
kept on 1.20 GenLSP.
Full suite: elixir_ls_utils 142, language_server 1588 (1 skipped, 2 excluded),
debug_adapter 116 — 0 failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.