From 72c4706f097a118f098a4773c126a225eba11ade Mon Sep 17 00:00:00 2001 From: Mitchell Hanberg Date: Sun, 17 Sep 2023 22:53:27 -0400 Subject: [PATCH] fix: guard from missing function doc (#226) --- lib/next_ls.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/next_ls.ex b/lib/next_ls.ex index 4c772b50..150ad615 100644 --- a/lib/next_ls.ex +++ b/lib/next_ls.ex @@ -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}