diff --git a/lib/next_ls.ex b/lib/next_ls.ex index 6cf06945..a733b92c 100644 --- a/lib/next_ls.ex +++ b/lib/next_ls.ex @@ -241,7 +241,7 @@ defmodule NextLS do end end) - {:reply, List.first(result), lsp} + {:reply, List.first(Enum.reject(result, &is_nil/1)), lsp} end def handle_request(%TextDocumentDocumentSymbol{params: %{text_document: %{uri: uri}}}, lsp) do