From 35a5b1a956dc4b3ef48a7e2fe27d163ff4161542 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Mon, 11 Apr 2022 21:55:34 -0400 Subject: [PATCH] Remove missing hash value from inlay hints --- lib/syntax_tree/language_server/inlay_hints.rb | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/syntax_tree/language_server/inlay_hints.rb b/lib/syntax_tree/language_server/inlay_hints.rb index 5e43439c..0bed2a80 100644 --- a/lib/syntax_tree/language_server/inlay_hints.rb +++ b/lib/syntax_tree/language_server/inlay_hints.rb @@ -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, # @@ -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:]