Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him)
Should we give priority to keeping the company of people who are on the same path or those who remind us of Allah?
You should strive to keep the company of those who remind you of Allah but at the same time give those who are on the same path their rights. Their rights are that you check up on them, help them as far as you able to and pray for them. It is not our way to avoid keeping the company of anyone as long as there is benefit in that and no harm.