diff --git a/lib/solargraph/yard_map/mapper.rb b/lib/solargraph/yard_map/mapper.rb index 33fed6653..d01b79868 100644 --- a/lib/solargraph/yard_map/mapper.rb +++ b/lib/solargraph/yard_map/mapper.rb @@ -17,6 +17,9 @@ def map @code_objects.each do |co| @pins.concat generate_pins co end + # Some yardocs contain documentation for dependencies that can be + # ignored here. The YardMap will load dependencies separately. + @pins.keep_if { |pin| pin.location.nil? || File.file?(pin.location.filename) } if @spec @pins end