Skip to content

Commit

Permalink
lv.el (lv-window-hook): Add
Browse files Browse the repository at this point in the history
Re emacs-lsp/lsp-mode#1216

Example:

    (add-hook 'lv-window-hook 'visual-line-mode)
  • Loading branch information
abo-abo committed Dec 14, 2019
1 parent bcc2d0e commit 9db2803
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lv.el
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ Only the background color is significant."
(defvar display-fill-column-indicator)
(defvar tab-line-format)

(defvar lv-window-hook nil
"Hook to run by `lv-window' when a new window is created.")

(defun lv-window ()
"Ensure that LV window is live and return it."
(if (window-live-p lv-wnd)
Expand All @@ -86,7 +89,8 @@ Only the background color is significant."
(setq display-line-numbers nil)
(setq display-fill-column-indicator nil)
(set-window-dedicated-p lv-wnd t)
(set-window-parameter lv-wnd 'no-other-window t))
(set-window-parameter lv-wnd 'no-other-window t)
(run-hooks 'lv-window-hook))
(select-window ori)))))

(defvar golden-ratio-mode)
Expand Down

0 comments on commit 9db2803

Please sign in to comment.