Skip to content

Commit

Permalink
Fix dialyzer error
Browse files Browse the repository at this point in the history
  • Loading branch information
NJichev committed Feb 17, 2024
1 parent 45a4be1 commit 86c5893
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/next_ls/code_actionable.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@ defmodule NextLS.CodeActionable do
# A diagnostic can produce 1 or more code actions hence we return a list

alias GenLSP.Structures.CodeAction
alias GenLSP.Structures.Diagnostic

defmodule Data do
@moduledoc false
defstruct [:diagnostic, :uri, :document]
@type t :: %__MODULE__{
diagnostic: Diagnostic.t(),
uri: String.t(),
document: String.t()
}
end

@callback from(diagnostic :: Data.t()) :: [CodeAction.t()]

# TODO: Add support for third party extensions
def from("elixir", diagnostic_data) do
NextLS.ElixirExtension.CodeAction.from(diagnostic_data)
end
Expand Down

0 comments on commit 86c5893

Please sign in to comment.