Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions lib/syntax_tree/language_server/inlay_hints.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@ def bare_rescue(location)
after[location.start_char + "rescue".length] << " StandardError"
end

# Adds the implicitly referenced value (local variable or method call)
# that is added into a hash when the value of a key-value pair is omitted.
# For example,
#
# { value: }
#
# becomes
#
# { value: value }
#
def missing_hash_value(key, location)
after[location.end_char] << " #{key}"
end

# Adds implicit parentheses around certain expressions to make it clear
# which subexpression will be evaluated first. For example,
#
Expand Down Expand Up @@ -69,8 +55,6 @@ def self.find(program)
case [parent_node, child_node]
in _, Rescue[exception: nil, location:]
inlay_hints.bare_rescue(location)
in _, Assoc[key: Label[value: key], value: nil, location:]
inlay_hints.missing_hash_value(key[0...-1], location)
in Assign | Binary | IfOp | OpAssign, IfOp[location:]
inlay_hints.precedence_parentheses(location)
in Assign | OpAssign, Binary[location:]
Expand Down