Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/elixir_sense/providers/completion/reducers/struct.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ defmodule ElixirSense.Providers.Completion.Reducers.Struct do
alias ElixirSense.Core.Source
alias ElixirSense.Core.State
alias ElixirSense.Providers.Utils.Matcher
alias ElixirSense.Providers.Completion.Suggestion

@type field :: %{
type: :field,
Expand All @@ -20,6 +21,13 @@ defmodule ElixirSense.Providers.Completion.Reducers.Struct do
@doc """
A reducer that adds suggestions of struct fields.
"""
@spec add_fields(
hint :: String.t(),
env :: State.Env.t(),
metadata :: Metadata.t(),
context :: Suggestion.cursor_context(),
Suggestion.acc()
) :: {:cont | :halt, Suggestion.acc()}
def add_fields(hint, env, buffer_metadata, context, acc) do
text_before = context.text_before

Expand Down
Loading