Skip to content

Autocompleting local macros shouldn't require the current module #1129

@sabiwara

Description

@sabiwara

Precheck

Environment

  • Elixir & Erlang versions (elixir --version): Elixir 1.17.3 (compiled with Erlang/OTP 27)
  • Elixir Language Server version: v0.24.2
  • Operating system: MacOS
  • Editor or IDE name (e.g. Emacs/VSCode): VSCode
  • Editor Plugin/LSP Client name and version:

Current behavior

defmodule Foo do
  defmacro foo(ast), do: ast

  def bar do
    fo<autocomplete>
  end
end

adds require Foo at the top of Foo.

Expected behavior

No require for local defmacros.

Will send a tentative PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions