Passage
For thou art my lamp, Jehovah; And Jehovah enlighteneth my darkness.
For thou art my lamp, Jehovah; And Jehovah enlighteneth my darkness.
2 Samuel 22:27 With the pure thou dost shew thyself pure; And with the perverse thou dost shew thyself contrary.
2 Samuel 22:28 And the afflicted people thou dost save; And thine eyes are upon the haughty, [whom] thou bringest down.
2 Samuel 22:29 For thou art my lamp, Jehovah; And Jehovah enlighteneth my darkness.
2 Samuel 22:30 For by thee I have run through a troop; By my God have I leaped over a wall.
2 Samuel 22:31 As for God, his way is perfect; The word of Jehovah is tried: He is a shield to all that trust in him.
The verse centers on "light", "darkness", "thou", "lamp", "jehovah", and "enlighteneth". It is saying that the contrast between light and darkness marks a real divide in how people respond to God's work.
The nearby context moves from verse 28's "And the afflicted people thou dost save..." into verse 30's "For by thee I have run through...", so "light" and "darkness" belong inside that flow. In 2 Samuel context, the local focus is covenant, worship, and faithfulness.
A plain takeaway is to answer the verse's own emphasis on "light" and "darkness" with trust shaped by these words, not by a vague optimism outside the passage.