2017-04-12 03:09:27 +00:00
|
|
|
;;; packages.el --- Spacemacs UI Visual Layer packages File
|
|
|
|
;;
|
2020-09-16 21:34:40 +00:00
|
|
|
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
2017-04-12 03:09:27 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
|
|
(setq spacemacs-visual-packages
|
|
|
|
'(
|
|
|
|
(ansi-colors :location built-in)
|
|
|
|
desktop
|
2019-12-15 06:17:57 +00:00
|
|
|
;; `display-fill-column-indicator' is available in Emacs 27+
|
|
|
|
(display-fill-column-indicator :location built-in
|
|
|
|
:toggle (boundp 'display-fill-column-indicator))
|
|
|
|
(fill-column-indicator :toggle (not (boundp 'display-fill-column-indicator)))
|
2017-04-12 03:09:27 +00:00
|
|
|
hl-todo
|
|
|
|
popup
|
|
|
|
popwin
|
|
|
|
(zoom-frm :location local)
|
|
|
|
))
|
|
|
|
|
|
|
|
(defun spacemacs-visual/init-ansi-colors ()
|
|
|
|
(add-hook 'compilation-filter-hook
|
|
|
|
'spacemacs-visual//compilation-buffer-apply-ansi-colors))
|
|
|
|
|
|
|
|
(defun spacemacs-visual/init-desktop ()
|
|
|
|
(use-package desktop
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2017-04-12 03:09:27 +00:00
|
|
|
:init
|
|
|
|
(setq desktop-dirname spacemacs-cache-directory)
|
|
|
|
:config
|
2018-06-01 06:59:57 +00:00
|
|
|
(add-to-list 'desktop-path spacemacs-cache-directory)))
|
2017-04-12 03:09:27 +00:00
|
|
|
|
2019-12-15 06:17:57 +00:00
|
|
|
(defun spacemacs-visual/init-display-fill-column-indicator ()
|
|
|
|
(spacemacs|add-toggle fill-column-indicator
|
|
|
|
:mode display-fill-column-indicator-mode
|
|
|
|
:documentation "Display the fill column indicator."
|
|
|
|
:evil-leader "tf")
|
|
|
|
(spacemacs|add-toggle fill-column-indicator-globally
|
|
|
|
:mode global-display-fill-column-indicator-mode
|
|
|
|
:documentation "Display the fill column indicator globally."
|
|
|
|
:evil-leader "t C-f")
|
|
|
|
(with-eval-after-load 'display-fill-column-indicator
|
|
|
|
;; manually register the minor mode since it does not define any
|
|
|
|
;; lighter
|
|
|
|
(add-to-list 'minor-mode-alist '(display-fill-column-indicator-mode ""))
|
|
|
|
(spacemacs|diminish display-fill-column-indicator-mode " ⓕ" " f")))
|
|
|
|
|
2017-04-12 03:09:27 +00:00
|
|
|
(defun spacemacs-visual/init-fill-column-indicator ()
|
|
|
|
(use-package fill-column-indicator
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2017-04-12 03:09:27 +00:00
|
|
|
:init
|
|
|
|
(progn
|
|
|
|
(setq fci-rule-width 1)
|
|
|
|
;; manually register the minor mode since it does not define any
|
|
|
|
;; lighter
|
2018-06-01 06:59:57 +00:00
|
|
|
(add-to-list 'minor-mode-alist '(fci-mode ""))
|
2017-04-12 03:09:27 +00:00
|
|
|
(spacemacs|add-toggle fill-column-indicator
|
|
|
|
:status fci-mode
|
|
|
|
:on (turn-on-fci-mode)
|
|
|
|
:off (turn-off-fci-mode)
|
|
|
|
:documentation "Display the fill column indicator."
|
|
|
|
:evil-leader "tf"))
|
|
|
|
:config
|
|
|
|
(spacemacs|diminish fci-mode " ⓕ" " f")))
|
|
|
|
|
|
|
|
(defun spacemacs-visual/init-hl-todo ()
|
|
|
|
(use-package hl-todo
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2018-12-19 00:13:48 +00:00
|
|
|
:init
|
|
|
|
;; global hook activates hl-todo-mode for prog-mode, text-mode
|
|
|
|
;; mode can be explicitly defined using hl-todo-activate-in-modes variable
|
|
|
|
(global-hl-todo-mode 1)))
|
2017-04-12 03:09:27 +00:00
|
|
|
|
|
|
|
(defun spacemacs-visual/init-popup ())
|
|
|
|
|
|
|
|
(defun spacemacs-visual/init-popwin ()
|
|
|
|
(use-package popwin
|
|
|
|
:config
|
|
|
|
(progn
|
|
|
|
(popwin-mode 1)
|
|
|
|
(spacemacs/set-leader-keys "wpm" 'popwin:messages)
|
|
|
|
(spacemacs/set-leader-keys "wpp" 'popwin:close-popup-window)
|
|
|
|
|
|
|
|
;; don't use default value but manage it ourselves
|
|
|
|
(setq popwin:special-display-config nil)
|
|
|
|
|
|
|
|
;; buffers that we manage
|
|
|
|
(push '("*Help*" :dedicated t :position bottom :stick t :noselect t :height 0.4) popwin:special-display-config)
|
2018-06-24 17:24:51 +00:00
|
|
|
(push '("*Process List*" :dedicated t :position bottom :stick t :noselect nil :height 0.4) popwin:special-display-config)
|
2020-04-16 11:32:34 +00:00
|
|
|
(push '(compilation-mode :dedicated nil :position bottom :stick t :noselect t :height 0.4) popwin:special-display-config)
|
|
|
|
(push '(dap-server-log-mode :dedicated nil :position bottom :stick t :noselect t :height 0.4) popwin:special-display-config)
|
2017-04-12 03:09:27 +00:00
|
|
|
(push '("*Shell Command Output*" :dedicated t :position bottom :stick t :noselect nil ) popwin:special-display-config)
|
|
|
|
(push '("*Async Shell Command*" :dedicated t :position bottom :stick t :noselect nil ) popwin:special-display-config)
|
2019-07-14 20:30:18 +00:00
|
|
|
(push '("*undo-tree*" :dedicated t :position right :stick t :noselect nil :width 60) popwin:special-display-config)
|
2016-12-14 01:00:30 +00:00
|
|
|
(push '("*undo-tree Diff*" :dedicated t :position bottom :stick t :noselect nil :height 0.3) popwin:special-display-config)
|
2017-04-12 03:09:27 +00:00
|
|
|
(push '("*ert*" :dedicated t :position bottom :stick t :noselect nil ) popwin:special-display-config)
|
|
|
|
(push '("*grep*" :dedicated t :position bottom :stick t :noselect nil ) popwin:special-display-config)
|
|
|
|
(push '("*nosetests*" :dedicated t :position bottom :stick t :noselect nil ) popwin:special-display-config)
|
2017-10-18 20:29:53 +00:00
|
|
|
(push '("^\*WoMan.+\*$" :regexp t :position bottom ) popwin:special-display-config)
|
|
|
|
(push '("*Google Translate*" :dedicated t :position bottom :stick t :noselect t :height 0.4) popwin:special-display-config))))
|
2017-04-12 03:09:27 +00:00
|
|
|
|
|
|
|
(defun spacemacs-visual/init-zoom-frm ()
|
|
|
|
(use-package zoom-frm
|
|
|
|
:commands (zoom-frm-unzoom
|
|
|
|
zoom-frm-out
|
|
|
|
zoom-frm-in)
|
|
|
|
:init
|
|
|
|
(progn
|
|
|
|
(spacemacs|define-transient-state zoom-frm
|
|
|
|
:title "Zoom Frame Transient State"
|
|
|
|
:doc "
|
2018-08-25 02:23:13 +00:00
|
|
|
[_+_/_=_/_k_] zoom frame in [_m_] max frame
|
2019-05-20 17:10:51 +00:00
|
|
|
[_-_/___/_j_] zoom frame out [_f_] fullscreen
|
2018-08-25 02:23:13 +00:00
|
|
|
[_0_]^^^^ reset zoom [_q_] quit"
|
2017-04-12 03:09:27 +00:00
|
|
|
:bindings
|
|
|
|
("+" spacemacs/zoom-frm-in)
|
|
|
|
("=" spacemacs/zoom-frm-in)
|
2019-05-20 17:10:51 +00:00
|
|
|
("k" spacemacs/zoom-frm-in)
|
2017-04-12 03:09:27 +00:00
|
|
|
("-" spacemacs/zoom-frm-out)
|
2019-05-20 17:10:51 +00:00
|
|
|
("_" spacemacs/zoom-frm-out)
|
2018-08-25 02:23:13 +00:00
|
|
|
("j" spacemacs/zoom-frm-out)
|
2017-04-12 03:09:27 +00:00
|
|
|
("0" spacemacs/zoom-frm-unzoom)
|
2018-08-25 02:23:13 +00:00
|
|
|
("f" spacemacs/toggle-frame-fullscreen-non-native)
|
|
|
|
("m" spacemacs/toggle-maximize-frame)
|
2017-04-12 03:09:27 +00:00
|
|
|
("q" nil :exit t))
|
|
|
|
(spacemacs/set-leader-keys "zf" 'spacemacs/zoom-frm-transient-state/body)
|
|
|
|
|
|
|
|
;; Font size, either with ctrl + mouse wheel
|
|
|
|
(global-set-key (kbd "<C-wheel-up>") 'spacemacs/zoom-frm-in)
|
|
|
|
(global-set-key (kbd "<C-wheel-down>") 'spacemacs/zoom-frm-out))))
|