29:18–20. David knew that the people needed to keep their devotion and remain circumspect in their obedience, so he prayed that the Lord Himself would preserve this forever in the intentions of the heart of Your people, and direct their heart to You (v. 18). This emphasis on the heart continued with a petition for Solomon (v. 19)—give to my son Solomon a perfect heart to keep Your commandments. David knew better than anyone that “man looks at the outward appearance, but the Lord looks at the heart” (1Sm 16:7).
This prayer was not just evocative but motivational: how can God’s people remain motivated for the task set before them? They must pray sincerely. Acknowledging God’s sovereignty and their utter dependence, they must maintain a willing and obedient heart. The prayer closes with a blessing on the Lord by the people (1Ch 29:20).
29:18 This formula Lord God of Abraham, Isaac, and Israel was associated with God’s covenantal promises to the Israelites (Ex. 3:6, 15; 6:3, 4; Deut. 6:10). With this name of God, David was petitioning God to keep His people always in covenant fellowship with Himself.
29:18 Wholehearted commitment comes ultimately with the perfection of Christ (Heb. 10:7–10) and the change of the heart that he works in us in the new covenant (Heb. 10:16–17).
29:18 establish their heart toward you David asks for God to help them keep faithful to His covenant.
29:18 keep forever. David’s words speak directly to the readers of a later time, who must continue to give freely to temple worship.
29:18–19 David prays that such a generous and obedient heart will continue in the people and in Solomon.
 Sproul, R. C. (Ed.). (2005). The Reformation Study Bible: English Standard Version (p. 594). Orlando, FL; Lake Mary, FL: Ligonier Ministries.