Skip to content

Commit 4fa9d7a

Browse files
committed
handle atom args better
1 parent 363d3d1 commit 4fa9d7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/language_server/lib/language_server/providers/document_symbols.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ defmodule ElixirLS.LanguageServer.Providers.DocumentSymbols do
199199

200200
%Info{
201201
type: type,
202-
name: "#{name_str}/#{length(args || [])}",
202+
name: "#{name_str}/#{if(is_list(args), do: length(args), else: 0)}",
203203
detail: "@#{type_kind}",
204204
location: location,
205205
selection_location: type_head_location,
@@ -237,7 +237,7 @@ defmodule ElixirLS.LanguageServer.Providers.DocumentSymbols do
237237
%Info{
238238
type: if(defname in @macro_defs, do: :constant, else: :function),
239239
symbol: name_str,
240-
name: "#{name_str}/#{length(args || [])}",
240+
name: "#{name_str}/#{if(is_list(args), do: length(args), else: 0)}",
241241
detail: defname,
242242
location: location,
243243
selection_location: head_location,
@@ -261,7 +261,7 @@ defmodule ElixirLS.LanguageServer.Providers.DocumentSymbols do
261261
%Info{
262262
type: if(defname in @macro_defs, do: :constant, else: :function),
263263
symbol: name_str,
264-
name: "#{name_str}/#{length(args || [])}",
264+
name: "#{name_str}/#{if(is_list(args), do: length(args), else: 0)}",
265265
detail: defname,
266266
location: location,
267267
selection_location: head_location,

0 commit comments

Comments
 (0)