From 042f2be6d735ef520bbcbb1dc0cf9fa59bb5dad0 Mon Sep 17 00:00:00 2001 From: Mitchell Hanberg Date: Sun, 17 Sep 2023 22:50:42 -0400 Subject: [PATCH] fix: guard from missing function doc --- 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}