In The Empire Strikes Back, Luke hints at his connection to the Force and Yoda by telling R2-D2 that Dagobah seems familiar to him.
Yoda and Luke from Empire Strikes Back on Dagobah
Luke's comment to R2-D2 that Dagobah looks and sounds familiar is one of the most out-of-place moments in all of The Empire Strikes Back.
He has already mentioned that their current situation resembles a dream.
Even though Dagobah is immense, Luke feels instantly at home there, and he also manages to land close to Yoda.
As so, it seems like something—aside from Obi-Wan’s ghost—guided him to where he needed to be.
Luke has a stronger connection to the Force than other Jedi because of his family's lineage.
Since the planet Dagobah has significant links to the Force, it seems natural that Luke gets a curiously familiar feeling while there that he can't quite identify.
Yoda tells him that via the Force he can see the past, which is presumably why he gets a sense of déjà vu when on the planet.
Dagobah heightens his senses in a way that is natural to someone powerful with the Force—which is one of numerous reasons why Yoda opted to exile himself on the odd planet.
In episode 6 of The Clone Wars, Qui-Gon Jinn brought Yoda to Dagobah for the first time.
According to Qui-Gon, Dagobah has a stronger Force connection than any other planet since it is one of the cleanest locations in the galaxy.
All living things have some measure of the Force, but Dagobah serves as a very potent channel for the Force compared to other planets in the galaxy.
To understand why Luke sees himself confronting Darth Vader in a cave on Dagobah, we must first understand why Luke gets this vision.
This is also the reason why, many years earlier, during a trip to Dagobah, Yoda had a premonition of the destruction of the Jedi Order.
The cave on Dagobah is more attuned to the Force than any other location on the island since it lies deeper below and closer to the island's very center.
In Rebels, Ezra Bridger experienced a similar sensation when he was attracted to a Jedi Temple on Lothal.
The Lothal temple, like the Dagobah cave, is located under the surface.
Similar to Luke's experience on Dagobah, Ezra got a vision of his greatest fear while in the temple.
The two may feel an instant bond, and Luke may begin to sense his connection to Yoda.
Luke's feelings of closeness on Dagobah might also have been the result of his relationship with Yoda.
Due to Yoda's presence during both Luke and Leia's births, their encounter on Dagobah was not their first.
Yoda's desire for Luke to remain on Dagobah and finish his Jedi training makes sense, given that he has witnessed Luke's whole trip.
In The Empire Strikes Back, Luke decides to leave Dagobah and Yoda despite their importance in his life.