Skip to content

Commit

Permalink
finish the modifications from @vinistock in listener/definition.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Super-Xray committed May 30, 2024
1 parent 63bf6b8 commit 3936d15
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/ruby_lsp/listeners/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,10 @@ def handle_require_definition(node)

sig { params(node: Prism::CallNode).void }
def handle_autoload_definition(node)
arguments = node.arguments&.arguments
return unless arguments

return unless arguments.first
argument = node.arguments&.arguments&.first
return unless argument.is_a?(Prism::SymbolNode)

value = arguments.first&.value
return unless value
value = argument.value

find_in_index(value)
end
Expand Down

0 comments on commit 3936d15

Please sign in to comment.