The third benefit of the Spell Sniper feat says:
You learn one cantrip that requires an attack roll. Choose the cantrip from the bard, cleric, druid, sorcerer, warlock, or wizard spell list. Your spellcasting ability for this cantrip depends on the spell list you chose from: Charisma for bard, sorcerer, or warlock; Wisdom for cleric or druid; or Intelligence for wizard.
Since the Primal Savagery cantrip makes an attack roll, can it be learned this way?
The spell has a range of "Self", and uses a melee spell attack rather than a ranged one, so I'm unsure if it can be learned using the spell.