The Arizal says that parents having a certain level of ruach hakodesh when naming their child.
Sha’ar HaGilgulim (23:8) - ונמצא כי כאשר נולד האדם וקוראים לו אביו ואמו שם אחד העולה בדעתם אינו באקראי ובהזדמן כי אם הקב"ה משים בפיו השם ההוא המוכרח אל הנשמה ההיא כמש"ה אשר שם שמות בארץ כפי מקום האבר שבאדם העליון אשר ממנו חוצב והשם הזה נרשם למעלה בכסא הכבוד כנודע ולכן ארז"ל שמא גרים
Does this ruach hakodesh apply even when naming one's child after an ancestor or only when considering a name without previous "obligations" or external pressure? (Perhaps the external pressure is min hashamayim too, but is there a source one way or the other?)