And you established for yourself your people Israel to be your people forever. And you, O LORD, became their God.
We have here the solemn address David made to God, in answer to the gracious message God had sent him. We are not told what he said to Nathan; no doubt he received him very kindly and respectfully as God's messenger. But his answer to God he took himself, and did not send by Nathan.
Commenting on 2 Samuel 7:18-29
For thou hast confirmed to thyself thy people Israel to be a people unto thee for ever,.... So long as they were obedient to him, and observed his laws and statutes, and abode by his worship and ordinances, otherwise he would write a "loammi" on them, as he has, see Hos 1:9, and thou, Lord, art become their God; their covenant God, they having avouched...
For thou hast confirmed to thyself thy people Israel [to be] a people unto thee for ever: and thou, LORD, art become their God. (m) He shows that God's free election is the only reason why the Israelites were chosen to be his people.