وَلَقَدْ ءَاتَيْنَا لُقْمَٰنَ ٱلْحِكْمَةَ أَنِ ٱشْكُرْ لِلَّهِ وَمَن يَشْكُرْ فَإِنَّمَا يَشْكُرُ لِنَفْسِهِۦ · وَإِذْ قَالَ لُقْمَٰنُ لِٱبْنِهِۦ وَهُوَ يَعِظُهُۥ يَٰبُنَىَّ لَا تُشْرِكْ بِٱللَّهِ إِنَّ ٱلشِّرْكَ لَظُلْمٌ عَظِيمٌ
"Truly We gave Luqmān wisdom: 'Be grateful to God. Whoever is grateful is grateful for his own sake.' And when Luqmān said to his son, counselling him: 'My dear son! Do not associate anything with God; associating is indeed a great wrong.'"
The root ح-ك-م was analysed at 2/269 in al-Baqara: to restrain, to make firm; ḥakama — the bit that turns an animal's head. I do not repeat it.
What belongs here is this: the verse says that wisdom was given, and immediately afterwards gives its content: ani'shkur li'llāh. That is, wisdom is set out not as a heap of knowledge but as a bearing.
And the return for gratitude is stated in the same sentence: wa man yashkur fa-innamā yashkuru li-nafsih — gratitude comes back to the one who is grateful.
Bunayy is the diminutive (taṣghīr) form of ibn (son). And in Arabic the diminutive is not always a belittling; it also conveys love and tenderness. The lexicographers call this taṣghīr al-tarkhīm.
The address occurs three times in the sūra (13, 16, 17) and each time it opens a new counsel. This is a pattern that can be verified from the text.
The first of the counsels is a prohibition, and its ground is a definition: associating is named ẓulm.
The root ظ-ل-م: the core sense the lexicographers give is to put a thing somewhere other than its own place. Ẓalama'l-biʾr — he dug the well where its place was not.
This description explains the ruling of the sentence, and I record this as my own reading: by the description of the root, associating is a placing that is out of place — an ascription set where nothing deserves it. That is, "wrong" here is not a metaphor but the direct application of the word's lexical sense.