I'm trying to add hooks to web-mode and js2-mode to set the header-line. It works for prog-mode and text-mode but not for web-mode and js2-mode since they are derived from fundamental-mode.
More tricky thing is it works when I open the html or js files with dired or treemacs but not for ranger or deer. I get so confused and I already tried ranger-mode-load-hook but still not working.
I'm trying to add hooks to
web-mode
andjs2-mode
to set the header-line. It works forprog-mode
andtext-mode
but not forweb-mode
andjs2-mode
since they are derived fromfundamental-mode
.More tricky thing is it works when I open the html or js files with
dired
ortreemacs
but not forranger
ordeer
. I get so confused and I already triedranger-mode-load-hook
but still not working.I'm using
ranger-20170817.857
and emacs 25.3.Here is the
header-line-format
value opened with dired and ranger.Dired:![](https://ws4.sinaimg.cn/large/006tKfTcgy1fkzy65rgbfj30qq0eon4r.jpg)
Ranger:![](https://ws2.sinaimg.cn/large/006tKfTcgy1fkzy6yeznlj30qq0eodol.jpg)
I tried adding hooks to
ranger-mode-load-hook
and setranger-modify-header
to nil. Not working.Need some help here~ Thanks.