Pronoun placement with negatives and questions

The default position

In European Portuguese, object pronouns typically attach to the end of the verb with a hyphen in simple affirmative sentences.

Do you promise me the truth?
Prometes-me a verdade?

Before we look at when this rule changes, let's meet two new indirect object pronouns meaning "to him/her/you" and "to them":

to him / to her / to you (formal)
lhe
to them / to you (plural formal)
lhes

Negative words pull the pronoun

Certain words act like magnets, pulling the object pronoun to the front of the verb (and dropping the hyphen).

If a sentence contains a negative term like não (not), nunca (never), or ninguém (nobody), the pronoun shifts to the front.

I do not give him the address.
Eu não lhe dou a morada.
They do not lend me the car.
Eles não me emprestam o carro.
Nobody lends him the money.
Ninguém lhe empresta o dinheiro.

Question words pull the pronoun

Question words are also magnets. When asking a question starting with words like quem (who), o que (what), or onde (where), the pronoun must also go before the verb.

Who gives him the address?
Quem lhe dá a morada?
What do you show them?
O que lhes mostras?
Where do you give them the money?
Onde lhes dás o dinheiro?