Ammon told King Lamoni that God “knows all the thoughts and intents of the heart” (Alma 18:32).
Alma explained to his son Corianton that we will be judged not only according to our works, but also according to our desires:
The one raised to happiness according to his desires of happiness, or good according to his desires of good; and the other to evil according to his desires of evil; for as he has desired to do evil all the day long even so shall he have his reward of evil when the night cometh.
And so it is on the other hand. If he hath repented of his sins, and desired righteousness until the end of his days, even so he shall be rewarded unto righteousness.Alma 41:5-6
In 1836, the Lord reiterated this principle. After showing Joseph Smith the glory of the celestial kingdom in the Kirtland Temple, He affirmed:
I, the Lord, will judge all men according to their works, according to the desire of their hearts.Doctrine and Covenants 137:9
Five years earlier, the Lord had clarified that spiritual gifts are not only for those who do good but also for those who are trying to do good: “They are given for the benefit of those who love me and keep all my commandments, and him that seeketh so to do” (Doctrine and Covenants 46:9, italics added).
Commenting on this passage, Elder Jeffrey R. Holland said:
Boy, aren’t we all thankful for that added provision “and … seeketh so to do”! That has been a lifesaver because sometimes that is all we can offer! We take some solace in the fact that if God were to reward only the perfectly faithful, He wouldn’t have much of a distribution list.
Please remember…that the Lord blesses those who want to improve, who accept the need for commandments and try to keep them, who cherish Christlike virtues and strive to the best of their ability to acquire them. If you stumble in that pursuit, so does everyone; the Savior is there to help you keep going…. He will help you get back up. He will help you repent, repair, fix whatever you have to fix, and keep going. Soon enough you will have the success you seek.“Tomorrow the Lord Will Do Wonders among You,” General Conference, April 2016
Today, I will remember that the Lord knows my desires. When I fall short of my own expectations, I will turn to Him for help. I will remember that He blesses us not only for our righteous actions but also for our righteous desires.