Don't disable hl-line in visual mode
This commit is contained in:
parent
ea2121ffeb
commit
ee94db2678
1 changed files with 3 additions and 5 deletions
|
@ -115,17 +115,15 @@
|
||||||
(use-package hl-line
|
(use-package hl-line
|
||||||
:init (add-hook 'prog-mode-hook 'hl-line-mode)
|
:init (add-hook 'prog-mode-hook 'hl-line-mode)
|
||||||
:config
|
:config
|
||||||
;; Doesn't play nice with emacs 25+
|
;; stickiness doesn't play nice with emacs 25+
|
||||||
(setq hl-line-sticky-flag nil
|
(setq hl-line-sticky-flag nil
|
||||||
global-hl-line-sticky-flag nil)
|
global-hl-line-sticky-flag nil)
|
||||||
|
|
||||||
|
;; Remember whether hl-line was initially on or off in the current buffer
|
||||||
(defvar-local doom--hl-line-mode nil)
|
(defvar-local doom--hl-line-mode nil)
|
||||||
(defun doom|hl-line-on () (if doom--hl-line-mode (hl-line-mode +1)))
|
(defun doom|hl-line-on () (if doom--hl-line-mode (hl-line-mode +1)))
|
||||||
(defun doom|hl-line-off () (if doom--hl-line-mode (hl-line-mode -1)))
|
(defun doom|hl-line-off () (if doom--hl-line-mode (hl-line-mode -1)))
|
||||||
(add-hook! hl-line-mode (if hl-line-mode (setq doom--hl-line-mode t)))
|
(add-hook! hl-line-mode (if hl-line-mode (setq doom--hl-line-mode t))))
|
||||||
;; Disable line highlight in visual mode
|
|
||||||
(add-hook 'evil-visual-state-entry-hook 'doom|hl-line-off)
|
|
||||||
(add-hook 'evil-visual-state-exit-hook 'doom|hl-line-on))
|
|
||||||
|
|
||||||
(use-package highlight-indentation
|
(use-package highlight-indentation
|
||||||
:commands (highlight-indentation-mode
|
:commands (highlight-indentation-mode
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue