Buddhism yes, Hinduism no. The Hindu dynasty of Kabul Shahi, was not native. You will hardly find any Hindu monument in Afghanistan, but entire eastern and central Afghanistan is dotted with Buddhist ruins and monuments. The ethnic Afghans themselves were not Hindus (thats why they coined the term Hindki for converts from Hinduism). Most probably they were not Buddhists either , for we dont find any Buddhist archaeological sites in the birth place of Pashtuns and its surroundings. A geography book of 983 A.D, Hadud-i-Alam, says that the newly converted King of Ninhar (Nangarhar) to Islam, had Muslim, Afghan and Hindu wives.....thus implying some of the Afghans were not yet converted to Islam and were not Hindus either. All the Pashtun tribes , currently living in the regions with Buddhist historical sites, are not the ancient inhabitants but migrants from Koh Suleiman range after Shahabuddin Ghauri period. For example you will find Buddhist stupas in Khyber agency but it doesnt imply that Afridis were once Buddhists or Hindus. From 16th century book of Akhund Darweza and from texts of Roshniyas , we come to know that Afridis migrated to Khyber pass and Tirah from Nangarhar in 16th century and displaced the native Dardic population (known as Tirahis). The expulsion of Idol-worshiping Tirahis (could be Hindus or Kafirs like Kalasha) was ordered by Pir Roshan for they were found cooperating with Mughals. Khyber agency was settled with Afridis and Shinwaris ,who were followers of Roshniya movement.
@django