diff --git a/core/core-modules.el b/core/core-modules.el index f91778076..5cd92540c 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -18,7 +18,8 @@ (:tools (rotate-text (:editor rotate-text))) (:emacs (electric-indent (:emacs electric)) (hideshow (:editor fold))) - (:ui (doom-modeline (:ui modeline)))) + (:ui (doom-modeline (:ui modeline))) + (:ui (fci (:ui fill-column)))) "An alist of deprecated modules, mapping deprecated modules to an optional new location (which will create an alias). Each CAR and CDR is a (CATEGORY . MODULES). E.g. diff --git a/init.example.el b/init.example.el index beeddd51d..d796af67b 100644 --- a/init.example.el +++ b/init.example.el @@ -23,7 +23,7 @@ doom-dashboard ; a nifty splash screen for Emacs doom-quit ; DOOM quit-message prompts when you quit Emacs evil-goggles ; display visual hints when editing in evil - ;;fci ; a `fill-column' indicator + ;;fill-column ; a `fill-column' indicator hl-todo ; highlight TODO/FIXME/NOTE tags ;;indent-guides ; highlighted indent columns modeline ; snazzy, Atom-inspired modeline, plus API diff --git a/modules/ui/fci/autoload.el b/modules/ui/fci/autoload.el deleted file mode 100644 index f7af8865f..000000000 --- a/modules/ui/fci/autoload.el +++ /dev/null @@ -1,15 +0,0 @@ -;;; ui/fci/autoload.el -*- lexical-binding: t; -*- - -(defvar-local +fci-last-state nil) - -;;;###autoload -(defun +fci|disable-when-company-activates (&rest ignore) - "TODO" - (when (setq +fci-last-state (bound-and-true-p fci-mode)) - (fci-mode -1))) - -;;;###autoload -(defun +fci|enable-when-company-deactivates (&rest ignore) - "TODO" - (when +fci-last-state - (fci-mode 1))) diff --git a/modules/ui/fci/config.el b/modules/ui/fci/config.el deleted file mode 100644 index 77da05dd8..000000000 --- a/modules/ui/fci/config.el +++ /dev/null @@ -1,35 +0,0 @@ -;;; ui/fci/config.el -*- lexical-binding: t; -*- - -(defvar +fci-rule-color-function - (if EMACS26+ - (lambda () (face-foreground 'line-number)) - (lambda () (face-foreground 'font-lock-comment-face))) - "Color used to draw the fill-column rule. - -Accepts a color string or a function that returns a color. - -Changes to this variable do not take effect until `fci-mode' is restarted.") - - -;; -;; Packages - -(def-package! fill-column-indicator - :hook ((text-mode prog-mode conf-mode) . turn-on-fci-mode) - :config - ;; fci is broken in `org-mode' when `org-indent-mode' is active. org-indent is - ;; more important to me, so... - (add-hook 'org-mode-hook #'turn-off-fci-mode) - - (defun +fci|set-color () - "Automatically change `fci-rule-color' based on `+fci-rule-color-function's -return value. To disable this, either set `+fci-rule-color-function' to nil or -remove `+fci|set-color' from `fci-mode-hook'." - (when (functionp +fci-rule-color-function) - (setq fci-rule-color (funcall +fci-rule-color-function)))) - (add-hook 'fci-mode-hook #'+fci|set-color) - - (when (featurep! :completion company) - (add-hook 'company-completion-started-hook #'+fci|disable-when-company-activates) - (add-hook! '(company-completion-finished-hook company-completion-cancelled-hook) - #'+fci|enable-when-company-deactivates))) diff --git a/modules/ui/fci/packages.el b/modules/ui/fci/packages.el deleted file mode 100644 index 26d8b1335..000000000 --- a/modules/ui/fci/packages.el +++ /dev/null @@ -1,4 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; ui/fci/packages.el - -(package! fill-column-indicator) diff --git a/modules/ui/fill-column/config.el b/modules/ui/fill-column/config.el new file mode 100644 index 000000000..3a2629e4f --- /dev/null +++ b/modules/ui/fill-column/config.el @@ -0,0 +1,4 @@ +;;; ui/fill-column/config.el -*- lexical-binding: t; -*- + +(def-package! hl-fill-column + :hook ((text-mode prog-mode conf-mode) . hl-fill-column-mode)) diff --git a/modules/ui/fill-column/packages.el b/modules/ui/fill-column/packages.el new file mode 100644 index 000000000..0117dad31 --- /dev/null +++ b/modules/ui/fill-column/packages.el @@ -0,0 +1,4 @@ +;; -*- no-byte-compile: t; -*- +;;; ui/fill-column/packages.el + +(package! hl-fill-column)