This problem is killing my productivity.
The Emacs Starter Kit automatically enables hl-line, which highlights the current line. It makes me unable to see the highlighting on the current line.
I've tried setting (global-hl-line-mode nil)
and (hl-line-mode nil)
globally and added to the mode hooks such as clojure-mode-hook, but it still shows up.
What elisp do I need to disable this feature?
In starter kit 2 the corresponding hook to remove is:
(remove-hook 'prog-mode-hook 'esk-turn-on-hl-line-mode)
You'll need to add that to your own configuration after starter kit has initialised.
hl-line-mode is turned on by the following line in starter-kit-defuns.el:
(add-hook 'coding-hook 'turn-on-hl-line-mode)
You can either comment out that line, or if you'd rather not touch the starter kit files, you can put the following in your personal init file at ~/.emacs.d/{username}.el:
(remove-hook 'coding-hook 'turn-on-hl-line-mode)
I know this is an old question, but I recently had the same issue (using emacs 24) and found that it also can be solved simply by customizing the "hl-line" face:
If you turn off all attributes, you effectively disable the feature, at least from the user's point of view. For me, turning of the color highlighting and just setting "Weight" to "heavy" transformed hl-line from an annoyance to an unobtrusive, moderately useful feature.
Try to place (global-hl-line-mode nil)
at the bottom of your .emacs
so no other command overwrites it.
I don't think your problem came from ESK - it doesn't enable hl-line-mode. You'd have to have a line looking like (global-hl-line-mode t)
somewhere if that were true. I'd suggest to simply search for that line in your config and and remove it if you find it. There are other highlighting modes as well. ESK automatically installs idle-highlight from ELPA - maybe this is what you mean. You can remove it by deleting it's entry from this piece of code in starter-kit-elpa.el:
(defvar starter-kit-packages (list 'idle-highlight
'ruby-mode
'inf-ruby
'css-mode
'yaml-mode
'find-file-in-project
'magit
'gist)
You should also remove the downloaded package from ELPA's folder and restart Emacs.
If you use ESK then the best place to put your own customizations is not .emacs but .emacs.d/{username}.el or .emacs.d/{username}/{username}.el.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With