Lifelink attacking a planeswalker
You will gain life by attacking a planeswalker with a creature that has lifelink. More generally, any damage source with lifelink will cause you to gain life if it deals damage to anything.

The definition of lifelink in rule 702.15b says this:


  Damage dealt by a source with lifelink causes that source’s controller, or its owner if it has no controller, to gain that much life (in addition to any other results that damage causes). See rule 119.3.