Passage
And Dauid spake the woordes of this song vnto the Lord, what time the Lord had deliuered him out of the handes of all his enemies, and out of the hand of Saul.
And Dauid spake the woordes of this song vnto the Lord, what time the Lord had deliuered him out of the handes of all his enemies, and out of the hand of Saul.
2 Samuel 22:1 And Dauid spake the woordes of this song vnto the Lord, what time the Lord had deliuered him out of the handes of all his enemies, and out of the hand of Saul.
2 Samuel 22:2 And he sayd, The Lord is my rocke and my fortresse, and he that deliuereth mee.
2 Samuel 22:3 God is my strength, in him will I trust: my shielde, and the horne of my saluation, my hie tower and my refuge: my Sauiour, thou hast saued me from violence.
The verse centers on "dauid", "spake", "woordes", "song", "vnto", "lord", and "time". It is saying that the verse draws attention to "dauid" and "spake", so its meaning should be read from those terms before moving to application.
The next verse adds "And he sayd The Lord is my...", so "dauid" and "spake" should be read forward into that movement. In 2 Samuel context, the local focus is covenant, worship, and faithfulness.
A plain takeaway is to answer the verse's own emphasis on "dauid" and "spake" with trust shaped by these words, not by a vague optimism outside the passage.