The psalmist’s confidence brims over the top now: if v. 149 shows that he can make claim on God because of God’s steadfast love and judgment, in vv. 150-151 the psalmist expresses a singular confidence.
150 Those who persecute me with evil purpose draw near;
they are far from your law.
151 Yet you are near, O LORD,
and all your commandments are true.
Here is his confidence: his opponents are near in the sense that they are at his doorway and ready to bring him down. They may be near to the psalmist’s place, but they are “far from your law” (150).
But, and here’s a big one, they may be near, but God is near. God’s nearness trumps the nearness of the opponents.
The last line in v. 151 might just be another way of restating what the psalmist said in v. 149: God’s steadfast love and judment are God’s utter faithful truthfulness (v. 151). God remains true to his word; God remains true to himself. Therefore, God’s nearness trumps their nearness: if God is near and if God is true to his righteous judgment, then the opponents are doomed.