elixir-tools / next-ls

The language server for Elixir that just works. Ready for early adopters!
https://www.elixir-tools.dev/next-ls
MIT License
700 stars 40 forks source link

bug: add require code action put require inside typedstruct block #509

Open mhanberg opened 5 months ago

mhanberg commented 5 months ago

Problem

with code similar to the following, the require Logger expression was added in inside the typedstruct block

defmodule Bar do
  use TypedStruct

  require AnotherModule

  typedstruct module: Some.Thing do
    @moduledoc false
    field :name, String.t(), enforce: true

  end

  def foo do
    Logger.warning("something")
  end
end