Skip to content

Commit

Permalink
add presentation hints to scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Jul 16, 2024
1 parent 6399ea3 commit f7b6bf0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/debug_adapter/lib/debug_adapter/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,7 @@ defmodule ElixirLS.DebugAdapter.Server do

vars_scope = %{
"name" => "variables",
"presentationHint" => "locals",
"variablesReference" => bindings_id,
"namedVariables" => Enum.count(frame.bindings),
"indexedVariables" => 0,
Expand Down Expand Up @@ -1232,6 +1233,7 @@ defmodule ElixirLS.DebugAdapter.Server do

vars_scope = %{
"name" => "variables",
"presentationHint" => "locals",
"variablesReference" => vars_id,
"namedVariables" => map_size(variables),
"indexedVariables" => 0,
Expand All @@ -1240,6 +1242,7 @@ defmodule ElixirLS.DebugAdapter.Server do

versioned_vars_scope = %{
"name" => "versioned variables",
"presentationHint" => "locals",
"variablesReference" => versioned_vars_id,
"namedVariables" => Enum.count(frame.bindings),
"indexedVariables" => 0,
Expand All @@ -1250,6 +1253,7 @@ defmodule ElixirLS.DebugAdapter.Server do
if frame.args != :undefined do
%{
"name" => "arguments",
"presentationHint" => "arguments",
"variablesReference" => args_id,
"namedVariables" => 0,
"indexedVariables" => Enum.count(frame.args),
Expand All @@ -1267,6 +1271,7 @@ defmodule ElixirLS.DebugAdapter.Server do

process_info_scope = %{
"name" => "process info",
"presentationHint" => "registers",
"variablesReference" => process_info_id,
"namedVariables" => length(process_info),
"indexedVariables" => 0,
Expand Down

0 comments on commit f7b6bf0

Please sign in to comment.