Skip to content

Commit

Permalink
fix: guard from missing function doc (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhanberg committed Sep 18, 2023
1 parent 315dd97 commit 72c4706
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/next_ls.ex
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,13 @@ defmodule NextLS do
"""

"function" ->
{_, _, _, doc, _} =
doc =
Enum.find(fdocs, fn {{type, name, _a}, _, _, _doc, _} ->
type in [:function, :macro] and to_string(name) == reference.identifier
end)

case doc do
%{"en" => fdoc} ->
{_, _, _, %{"en" => fdoc}, _} ->
"""
## #{Macro.to_string(mod)}.#{reference.identifier}/#{reference.arity}
Expand Down

0 comments on commit 72c4706

Please sign in to comment.