From 04b9b7e362bc2f7099baabaeaae02ffe38a70b30 Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Mon, 16 Oct 2023 08:15:59 -0400 Subject: [PATCH] fix: fallback when hovering of a non-function,module reference (#281) This fixes the following exception that I started getting with VSCode 1.82.3: ``` ** (CaseClauseError) no case clause matching: "attribute" (next_ls 0.13.4) lib/next_ls.ex:337: NextLS.handle_request/2 (gen_lsp 0.6.0) lib/gen_lsp.ex:248: anonymous fn/5 in GenLSP.loop/3 (gen_lsp 0.6.0) lib/gen_lsp.ex:308: GenLSP.attempt/3 (stdlib 5.0.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3 ``` Fixes #280. --- lib/next_ls.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/next_ls.ex b/lib/next_ls.ex index c111b054..2d78b242 100644 --- a/lib/next_ls.ex +++ b/lib/next_ls.ex @@ -359,6 +359,9 @@ defmodule NextLS do _ -> nil end + + nil -> + nil end else _ -> nil